Fix a worldgen deadlock

This commit is contained in:
IzzelAliz 2020-11-27 23:34:25 +08:00
parent ee86d9d0f1
commit 52e137a550

View File

@ -482,7 +482,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
@Inject(method = "setPositionAndRotation", at = @At("RETURN"))
private void arclight$loadChunk(double x, double y, double z, float yaw, float pitch, CallbackInfo ci) {
this.world.getChunk((int) Math.floor(this.getPosX()) >> 4, (int) Math.floor(this.getPosZ()) >> 4);
if (this.valid) this.world.getChunk((int) Math.floor(this.getPosX()) >> 4, (int) Math.floor(this.getPosZ()) >> 4);
}
public boolean canCollideWith(Entity entity) {