Skip to content

Commit e896854

Browse files
committed
fix: always use the full tick method
1 parent 50a59c0 commit e896854

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/main/java/com/ishland/vmp/mixins/playerwatching/optimize_nearby_entity_tracking_lookups/MixinThreadedAnvilChunkStorageEntityTracker.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,7 @@ public void updateListeners(Set<ServerPlayerEntity> triedPlayers) {
7878
@Override
7979
public void tryTick() {
8080
this.trackedSection = ChunkSectionPos.from(this.entity);
81-
if (!this.listeners.isEmpty()) {
82-
this.entry.tick();
83-
} else {
84-
final List<Entity> currentPassegers = this.entity.getPassengerList();
85-
if (!((IEntityTrackerEntry) this.entry).getLastPassengers().equals(currentPassegers)) {
86-
((IEntityTrackerEntry) this.entry).setLastPassengers(currentPassegers);
87-
}
88-
89-
if (this.entity instanceof ServerPlayerEntity player) {
90-
// for some reasons mojang decides to sync entity data here, so we need to do it manually
91-
92-
if (this.entity.velocityModified) {
93-
player.networkHandler.sendPacket(new EntityVelocityUpdateS2CPacket(this.entity));
94-
this.entity.velocityModified = false;
95-
}
96-
97-
((EntityTrackerEntryExtension) this.entry).vmp$syncEntityData();
98-
}
99-
}
81+
this.entry.tick();
10082
}
10183

10284
@Inject(method = "updateTrackedStatus(Lnet/minecraft/server/network/ServerPlayerEntity;)V", at = @At(value = "INVOKE", target = "Ljava/util/Set;add(Ljava/lang/Object;)Z", shift = At.Shift.BEFORE))

0 commit comments

Comments
 (0)