From 2a927e8638f66bb076b68ae8a0d1d0ee9ae72732 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 3 Aug 2017 23:00:00 +1000 Subject: Update to Minecraft 1.12.1 --- nms-patches/World.patch | 87 ++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 48 deletions(-) (limited to 'nms-patches/World.patch') diff --git a/nms-patches/World.patch b/nms-patches/World.patch index c6c7003d..ddda6510 100644 --- a/nms-patches/World.patch +++ b/nms-patches/World.patch @@ -1,7 +1,7 @@ --- a/net/minecraft/server/World.java +++ b/net/minecraft/server/World.java -@@ -13,6 +13,21 @@ - import java.util.UUID; +@@ -14,6 +14,21 @@ + import java.util.function.Supplier; import javax.annotation.Nullable; +// CraftBukkit start @@ -22,7 +22,7 @@ public abstract class World implements IBlockAccess { private int a = 63; -@@ -58,7 +73,52 @@ +@@ -59,7 +74,52 @@ private final WorldBorder P; int[] J; @@ -76,7 +76,7 @@ this.u = Lists.newArrayList(new IWorldAccess[] { this.t}); this.N = Calendar.getInstance(); this.scoreboard = new Scoreboard(); -@@ -71,6 +131,36 @@ +@@ -72,6 +132,36 @@ this.worldProvider = worldprovider; this.isClientSide = flag; this.P = worldprovider.getWorldBorder(); @@ -113,7 +113,7 @@ } public World b() { -@@ -208,6 +298,27 @@ +@@ -209,6 +299,27 @@ } public boolean setTypeAndData(BlockPosition blockposition, IBlockData iblockdata, int i) { @@ -141,7 +141,7 @@ if (this.E(blockposition)) { return false; } else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { -@@ -215,9 +326,23 @@ +@@ -216,9 +327,23 @@ } else { Chunk chunk = this.getChunkAtWorldCoords(blockposition); Block block = iblockdata.getBlock(); @@ -165,7 +165,7 @@ return false; } else { if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) { -@@ -226,6 +351,7 @@ +@@ -227,6 +352,7 @@ this.methodProfiler.b(); } @@ -173,7 +173,7 @@ if ((i & 2) != 0 && (!this.isClientSide || (i & 4) == 0) && chunk.isReady()) { this.notify(blockposition, iblockdata1, iblockdata, i); } -@@ -238,12 +364,37 @@ +@@ -239,12 +365,37 @@ } else if (!this.isClientSide && (i & 16) == 0) { this.c(blockposition, block); } @@ -211,7 +211,7 @@ public boolean setAir(BlockPosition blockposition) { return this.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3); } -@@ -277,6 +428,11 @@ +@@ -278,6 +429,11 @@ public void update(BlockPosition blockposition, Block block, boolean flag) { if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) { @@ -223,7 +223,7 @@ this.applyPhysics(blockposition, block, flag); } -@@ -365,6 +521,17 @@ +@@ -366,6 +522,17 @@ IBlockData iblockdata = this.getType(blockposition); try { @@ -241,7 +241,7 @@ iblockdata.doPhysics(this, blockposition, block, blockposition1); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Exception while updating neighbours"); -@@ -582,6 +749,17 @@ +@@ -583,6 +750,17 @@ } public IBlockData getType(BlockPosition blockposition) { @@ -259,7 +259,7 @@ if (this.E(blockposition)) { return Blocks.AIR.getBlockData(); } else { -@@ -787,6 +965,13 @@ +@@ -788,6 +966,13 @@ } public boolean addEntity(Entity entity) { @@ -273,7 +273,7 @@ int i = MathHelper.floor(entity.locX / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D); boolean flag = entity.attachedToPlayer; -@@ -795,6 +980,37 @@ +@@ -796,6 +981,37 @@ flag = true; } @@ -311,7 +311,7 @@ if (!flag && !this.isChunkLoaded(i, j, false)) { return false; } else { -@@ -817,6 +1033,7 @@ +@@ -818,6 +1034,7 @@ ((IWorldAccess) this.u.get(i)).a(entity); } @@ -319,7 +319,7 @@ } protected void c(Entity entity) { -@@ -824,6 +1041,7 @@ +@@ -825,6 +1042,7 @@ ((IWorldAccess) this.u.get(i)).b(entity); } @@ -327,7 +327,7 @@ } public void kill(Entity entity) { -@@ -859,7 +1077,15 @@ +@@ -860,7 +1078,15 @@ this.getChunkAt(i, j).b(entity); } @@ -344,7 +344,7 @@ this.c(entity); } -@@ -976,7 +1202,7 @@ +@@ -977,7 +1203,7 @@ } public boolean a(AxisAlignedBB axisalignedbb) { @@ -353,7 +353,7 @@ } public int a(float f) { -@@ -1046,6 +1272,11 @@ +@@ -1047,6 +1273,11 @@ for (i = 0; i < this.j.size(); ++i) { entity = (Entity) this.j.get(i); @@ -365,7 +365,7 @@ try { ++entity.ticksLived; -@@ -1094,8 +1325,10 @@ +@@ -1095,8 +1326,10 @@ CrashReportSystemDetails crashreportsystemdetails1; CrashReport crashreport1; @@ -378,7 +378,7 @@ Entity entity1 = entity.bJ(); if (entity1 != null) { -@@ -1128,7 +1361,7 @@ +@@ -1129,7 +1362,7 @@ this.getChunkAt(j, l).b(entity); } @@ -387,7 +387,7 @@ this.c(entity); } -@@ -1137,6 +1370,13 @@ +@@ -1138,6 +1371,13 @@ this.methodProfiler.c("blockEntities"); this.O = true; @@ -401,16 +401,7 @@ Iterator iterator = this.tileEntityListTick.iterator(); while (iterator.hasNext()) { -@@ -1147,7 +1387,7 @@ - - if (this.isLoaded(blockposition) && this.P.a(blockposition)) { - try { -- this.methodProfiler.a(tileentity.getClass().getSimpleName()); -+ this.methodProfiler.a("ticking"/*tileentity.getClass().getSimpleName()*/); // CraftBukkit: SPIGOT-1900 - ((ITickable) tileentity).e(); - this.methodProfiler.b(); - } catch (Throwable throwable2) { -@@ -1169,11 +1409,13 @@ +@@ -1172,11 +1412,13 @@ } this.O = false; @@ -424,7 +415,7 @@ this.methodProfiler.c("pendingBlockEntities"); if (!this.b.isEmpty()) { -@@ -1181,9 +1423,11 @@ +@@ -1184,9 +1426,11 @@ TileEntity tileentity1 = (TileEntity) this.b.get(i1); if (!tileentity1.y()) { @@ -436,7 +427,7 @@ if (this.isLoaded(tileentity1.getPosition())) { Chunk chunk = this.getChunkAtWorldCoords(tileentity1.getPosition()); -@@ -1191,6 +1435,12 @@ +@@ -1194,6 +1438,12 @@ chunk.a(tileentity1.getPosition(), tileentity1); this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); @@ -449,7 +440,7 @@ } } } -@@ -1244,15 +1494,13 @@ +@@ -1247,15 +1497,13 @@ int i; int j; @@ -471,7 +462,7 @@ entity.M = entity.locX; entity.N = entity.locY; -@@ -1265,6 +1513,7 @@ +@@ -1268,6 +1516,7 @@ entity.aE(); } else { entity.B_(); @@ -479,7 +470,7 @@ } } -@@ -1556,11 +1805,18 @@ +@@ -1559,11 +1808,18 @@ } } @@ -498,7 +489,7 @@ TileEntity tileentity = null; if (this.O) { -@@ -1595,6 +1851,14 @@ +@@ -1598,6 +1854,14 @@ public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { if (!this.E(blockposition)) { if (tileentity != null && !tileentity.y()) { @@ -513,7 +504,7 @@ if (this.O) { tileentity.setPosition(blockposition); Iterator iterator = this.b.iterator(); -@@ -1754,6 +2018,14 @@ +@@ -1757,6 +2021,14 @@ } this.o = MathHelper.a(this.o, 0.0F, 1.0F); @@ -528,7 +519,7 @@ } } } -@@ -1891,7 +2163,10 @@ +@@ -1894,7 +2166,10 @@ } public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) { @@ -540,7 +531,7 @@ return false; } else { int i = 0; -@@ -2058,7 +2333,7 @@ +@@ -2061,7 +2336,7 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -549,7 +540,7 @@ arraylist.add(entity); } } -@@ -2073,7 +2348,7 @@ +@@ -2076,7 +2351,7 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -558,7 +549,7 @@ arraylist.add(entity); } } -@@ -2122,7 +2397,7 @@ +@@ -2125,7 +2400,7 @@ } } @@ -567,7 +558,7 @@ } @Nullable -@@ -2143,8 +2418,17 @@ +@@ -2146,8 +2421,17 @@ while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); @@ -586,7 +577,7 @@ ++i; } } -@@ -2153,12 +2437,18 @@ +@@ -2156,12 +2440,18 @@ } public void a(Collection collection) { @@ -606,7 +597,7 @@ this.b(entity); } -@@ -2172,7 +2462,13 @@ +@@ -2175,7 +2465,13 @@ IBlockData iblockdata = this.getType(blockposition); AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition); @@ -621,7 +612,7 @@ } public int getSeaLevel() { -@@ -2282,6 +2578,11 @@ +@@ -2285,6 +2581,11 @@ for (int i = 0; i < this.players.size(); ++i) { EntityHuman entityhuman1 = (EntityHuman) this.players.get(i); @@ -633,7 +624,7 @@ if (predicate.apply(entityhuman1)) { double d5 = entityhuman1.d(d0, d1, d2); -@@ -2450,6 +2751,16 @@ +@@ -2453,6 +2754,16 @@ public void everyoneSleeping() {} @@ -650,7 +641,7 @@ public float h(float f) { return (this.p + (this.q - this.p) * f) * this.j(f); } -@@ -2667,7 +2978,7 @@ +@@ -2670,7 +2981,7 @@ int l = j * 16 + 8 - blockposition.getZ(); boolean flag = true; -- cgit v1.2.3