Fix incorrect player valid state

This commit is contained in:
IzzelAliz 2022-04-14 23:26:16 +08:00
parent cdb2ba1d43
commit 92061e569e
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -50,7 +50,7 @@ public class ServerLevel_EntityCallbacksMixin {
@Inject(method = "onTrackingEnd(Lnet/minecraft/world/entity/Entity;)V", at = @At("RETURN"))
private void arclight$invalid(Entity entity, CallbackInfo ci) {
((EntityBridge) entity).bridge$setValid(true);
((EntityBridge) entity).bridge$setValid(false);
if (!(entity instanceof ServerPlayer)) {
for (var player : outerThis.players()) {
((ServerPlayerEntityBridge) player).bridge$getBukkitEntity().onEntityRemove(entity);