Skip to content

Commit

Permalink
Exclude invisible entities
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Feb 15, 2022
1 parent b12ba4a commit 69aa869
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.2
loader_version=0.12.11
yarn_mappings=1.18.1+build.22
loader_version=0.13.1

#Fabric api
fabric_version=0.44.0+1.18
fabric_version=0.46.4+1.18

# Mod Properties
mod_version = 1.0.10
mod_version = 1.0.11
maven_group = org.samo_lego
archives_base_name = healthcare

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ private void onPacketSend(Packet<?> packet, GenericFutureListener<? extends Futu
entity instanceof LivingEntity living &&
((HealthbarPreferences) this.player).isEnabled() &&
!(entity instanceof PlayerEntity) &&
!config.blacklistedEntities.contains(Registry.ENTITY_TYPE.getId(entity.getType()).toString())
!config.blacklistedEntities.contains(Registry.ENTITY_TYPE.getId(entity.getType()).toString()) &&
!entity.isInvisibleTo(player)
) {
List<DataTracker.Entry<?>> trackedValues = new ArrayList<>(((EntityTrackerUpdateS2CPacketAccessor) packet).getTrackedValues());

Expand Down

0 comments on commit 69aa869

Please sign in to comment.