diff --git a/patches/net/minecraft/world/World.java.patch b/patches/net/minecraft/world/World.java.patch index f816b991..bdd93698 100644 --- a/patches/net/minecraft/world/World.java.patch +++ b/patches/net/minecraft/world/World.java.patch @@ -704,15 +704,15 @@ } } -@@ -2449,6 +2782,7 @@ - } +@@ -2451,6 +2784,7 @@ } + toInvalidate.forEach(TileEntity::invalidate); + tileEntityIn.setWorld(this); // Spigot - No null worlds this.addedTileEntityList.add(tileEntityIn); } else -@@ -2657,6 +2991,13 @@ +@@ -2659,6 +2993,13 @@ } this.rainingStrength = MathHelper.clamp(this.rainingStrength, 0.0F, 1.0F); @@ -726,7 +726,7 @@ } } } -@@ -2844,10 +3185,14 @@ +@@ -2846,10 +3187,14 @@ } } @@ -743,7 +743,7 @@ return false; } else -@@ -2858,9 +3203,9 @@ +@@ -2860,9 +3205,9 @@ this.profiler.startSection("getBrightness"); int l2 = this.getLightFor(lightType, pos); int i3 = this.getRawLight(pos, lightType); @@ -756,7 +756,7 @@ if (i3 > l2) { -@@ -3137,7 +3482,16 @@ +@@ -3139,7 +3484,16 @@ for (Entity entity4 : this.loadedEntityList) { @@ -774,7 +774,7 @@ { ++j2; } -@@ -3152,6 +3506,9 @@ +@@ -3154,6 +3508,9 @@ { if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.EntityJoinWorldEvent(entity4, this))) { @@ -784,7 +784,7 @@ loadedEntityList.add(entity4); this.onEntityAdded(entity4); } -@@ -3168,19 +3525,26 @@ +@@ -3170,19 +3527,26 @@ IBlockState iblockstate1 = this.getBlockState(pos); AxisAlignedBB axisalignedbb = skipCollisionCheck ? null : blockIn.getDefaultState().getCollisionBoundingBox(this, pos); @@ -814,7 +814,7 @@ } public int getSeaLevel() -@@ -3345,6 +3709,12 @@ +@@ -3347,6 +3711,12 @@ { EntityPlayer entityplayer1 = this.playerEntities.get(j2); @@ -827,7 +827,7 @@ if (p_190525_9_.apply(entityplayer1)) { double d1 = entityplayer1.getDistanceSq(x, y, z); -@@ -3592,6 +3962,16 @@ +@@ -3594,6 +3964,16 @@ { } @@ -844,7 +844,7 @@ public float getThunderStrength(float delta) { return (this.prevThunderingStrength + (this.thunderingStrength - this.prevThunderingStrength) * delta) * this.getRainStrength(delta); -@@ -3880,7 +4260,7 @@ +@@ -3882,7 +4262,7 @@ int j2 = x * 16 + 8 - blockpos1.getX(); int k2 = z * 16 + 8 - blockpos1.getZ(); int l2 = 128; @@ -853,7 +853,7 @@ } /* ======================================== FORGE START =====================================*/ -@@ -4016,4 +4396,48 @@ +@@ -4018,4 +4398,48 @@ { return null; } diff --git a/patches/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch b/patches/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch index a5f2d937..82e0a8c2 100644 --- a/patches/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch +++ b/patches/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch @@ -17,7 +17,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -@@ -79,14 +76,14 @@ +@@ -79,15 +76,14 @@ if (nbttagcompound == null) { @@ -31,11 +31,12 @@ } - nbttagcompound = this.fixer.process(FixTypes.CHUNK, CompressedStreamTools.read(datainputstream)); +- datainputstream.close(); // Forge: close stream after use + nbttagcompound = this.fixer.process(FixTypes.CHUNK, nbtTagCompound); } return this.checkedReadChunkFromNBT__Async(worldIn, x, z, nbttagcompound); -@@ -237,9 +234,10 @@ +@@ -238,9 +234,10 @@ private void writeChunkData(ChunkPos pos, NBTTagCompound compound) throws IOException { @@ -49,7 +50,7 @@ } public void saveExtraChunkData(World worldIn, Chunk chunkIn) throws IOException -@@ -608,8 +606,11 @@ +@@ -609,8 +606,11 @@ public static void spawnEntity(Entity entityIn, World worldIn) {