Fix PaperSpigot entity removal in unloaded chunks

This commit is contained in:
Byteflux 2014-10-14 19:36:06 -05:00
parent a4bc5cc10c
commit b8bc46347f

View file

@ -83,7 +83,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entity.ticksLived++;
entity.inactiveTick();
+ // PaperSpigot start - Remove entities in unloaded chunks
+ if (entity instanceof EntityEnderPearl) {
+ if (entity instanceof EntityEnderPearl || (!this.isChunkLoaded(i, j) &&
+ (entity instanceof EntityFallingBlock && this.paperSpigotConfig.removeUnloadedFallingBlocks) ||
+ (entity instanceof EntityTNTPrimed && this.paperSpigotConfig.removeUnloadedTNTEntities))) {
+ entity.inUnloadedChunk = true;
+ entity.die();
+ }