From e0001040ae8a1ccbae23ed754206d11759e87c43 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 7 May 2016 16:38:15 +1000 Subject: [PATCH] Rebuild patches --- CraftBukkit-Patches/0003-mc-dev-imports.patch | 249 +----------------- ...-Disabling-of-1.6.3-Structure-Saving.patch | 8 +- .../0051-Prevent-Mineshaft-Saving.patch | 8 +- ...Allow-Disabling-Creative-Item-Filter.patch | 8 +- .../0096-Convert-Horses-owner-to-UUID.patch | 8 +- 5 files changed, 18 insertions(+), 263 deletions(-) diff --git a/CraftBukkit-Patches/0003-mc-dev-imports.patch b/CraftBukkit-Patches/0003-mc-dev-imports.patch index 98181ff6..e0b3f8af 100644 --- a/CraftBukkit-Patches/0003-mc-dev-imports.patch +++ b/CraftBukkit-Patches/0003-mc-dev-imports.patch @@ -1,4 +1,4 @@ -From 9869907b2114041132556d184db61e0a61ccbd6f Mon Sep 17 00:00:00 2001 +From 1add68c38babb8285f1830a777f9f247f2aade1b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 15:10:48 +1100 Subject: [PATCH] mc-dev imports @@ -2267,251 +2267,6 @@ index 0000000..76bd9c1 + return this.g; + } +} -diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -new file mode 100644 -index 0000000..dacba33 ---- /dev/null -+++ b/src/main/java/net/minecraft/server/StructureGenerator.java -@@ -0,0 +1,239 @@ -+package net.minecraft.server; -+ -+import com.google.common.collect.Maps; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Map; -+import java.util.Random; -+import java.util.concurrent.Callable; -+ -+public abstract class StructureGenerator extends WorldGenBase { -+ -+ private PersistentStructure a; -+ protected Map c = Maps.newHashMap(); -+ -+ public StructureGenerator() {} -+ -+ public abstract String a(); -+ -+ protected final synchronized void a(World world, final int i, final int j, int k, int l, ChunkSnapshot chunksnapshot) { -+ this.a(world); -+ if (!this.c.containsKey(Long.valueOf(ChunkCoordIntPair.a(i, j)))) { -+ this.f.nextInt(); -+ -+ try { -+ if (this.a(i, j)) { -+ StructureStart structurestart = this.b(i, j); -+ -+ this.c.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart); -+ if (structurestart.a()) { -+ this.a(i, j, structurestart); -+ } -+ } -+ -+ } catch (Throwable throwable) { -+ CrashReport crashreport = CrashReport.a(throwable, "Exception preparing structure feature"); -+ CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Feature being prepared"); -+ -+ crashreportsystemdetails.a("Is feature chunk", new Callable() { -+ public String a() throws Exception { -+ return StructureGenerator.this.a(i, j) ? "True" : "False"; -+ } -+ -+ public Object call() throws Exception { -+ return this.a(); -+ } -+ }); -+ crashreportsystemdetails.a("Chunk location", (Object) String.format("%d,%d", new Object[] { Integer.valueOf(i), Integer.valueOf(j)})); -+ crashreportsystemdetails.a("Chunk pos hash", new Callable() { -+ public String a() throws Exception { -+ return String.valueOf(ChunkCoordIntPair.a(i, j)); -+ } -+ -+ public Object call() throws Exception { -+ return this.a(); -+ } -+ }); -+ crashreportsystemdetails.a("Structure type", new Callable() { -+ public String a() throws Exception { -+ return StructureGenerator.this.getClass().getCanonicalName(); -+ } -+ -+ public Object call() throws Exception { -+ return this.a(); -+ } -+ }); -+ throw new ReportedException(crashreport); -+ } -+ } -+ } -+ -+ public synchronized boolean a(World world, Random random, ChunkCoordIntPair chunkcoordintpair) { -+ this.a(world); -+ int i = (chunkcoordintpair.x << 4) + 8; -+ int j = (chunkcoordintpair.z << 4) + 8; -+ boolean flag = false; -+ Iterator iterator = this.c.values().iterator(); -+ -+ while (iterator.hasNext()) { -+ StructureStart structurestart = (StructureStart) iterator.next(); -+ -+ if (structurestart.a() && structurestart.a(chunkcoordintpair) && structurestart.b().a(i, j, i + 15, j + 15)) { -+ structurestart.a(world, random, new StructureBoundingBox(i, j, i + 15, j + 15)); -+ structurestart.b(chunkcoordintpair); -+ flag = true; -+ this.a(structurestart.e(), structurestart.f(), structurestart); -+ } -+ } -+ -+ return flag; -+ } -+ -+ public boolean b(BlockPosition blockposition) { -+ this.a(this.g); -+ return this.c(blockposition) != null; -+ } -+ -+ protected StructureStart c(BlockPosition blockposition) { -+ Iterator iterator = this.c.values().iterator(); -+ -+ while (iterator.hasNext()) { -+ StructureStart structurestart = (StructureStart) iterator.next(); -+ -+ if (structurestart.a() && structurestart.b().b((BaseBlockPosition) blockposition)) { -+ Iterator iterator1 = structurestart.c().iterator(); -+ -+ while (iterator1.hasNext()) { -+ StructurePiece structurepiece = (StructurePiece) iterator1.next(); -+ -+ if (structurepiece.c().b((BaseBlockPosition) blockposition)) { -+ return structurestart; -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ -+ public boolean b(World world, BlockPosition blockposition) { -+ this.a(world); -+ Iterator iterator = this.c.values().iterator(); -+ -+ StructureStart structurestart; -+ -+ do { -+ if (!iterator.hasNext()) { -+ return false; -+ } -+ -+ structurestart = (StructureStart) iterator.next(); -+ } while (!structurestart.a() || !structurestart.b().b((BaseBlockPosition) blockposition)); -+ -+ return true; -+ } -+ -+ public BlockPosition getNearestGeneratedFeature(World world, BlockPosition blockposition) { -+ this.g = world; -+ this.a(world); -+ this.f.setSeed(world.getSeed()); -+ long i = this.f.nextLong(); -+ long j = this.f.nextLong(); -+ long k = (long) (blockposition.getX() >> 4) * i; -+ long l = (long) (blockposition.getZ() >> 4) * j; -+ -+ this.f.setSeed(k ^ l ^ world.getSeed()); -+ this.a(world, blockposition.getX() >> 4, blockposition.getZ() >> 4, 0, 0, (ChunkSnapshot) null); -+ double d0 = Double.MAX_VALUE; -+ BlockPosition blockposition1 = null; -+ Iterator iterator = this.c.values().iterator(); -+ -+ BlockPosition blockposition2; -+ double d1; -+ -+ while (iterator.hasNext()) { -+ StructureStart structurestart = (StructureStart) iterator.next(); -+ -+ if (structurestart.a()) { -+ StructurePiece structurepiece = (StructurePiece) structurestart.c().get(0); -+ -+ blockposition2 = structurepiece.a(); -+ d1 = blockposition2.k(blockposition); -+ if (d1 < d0) { -+ d0 = d1; -+ blockposition1 = blockposition2; -+ } -+ } -+ } -+ -+ if (blockposition1 != null) { -+ return blockposition1; -+ } else { -+ List list = this.E_(); -+ -+ if (list != null) { -+ BlockPosition blockposition3 = null; -+ Iterator iterator1 = list.iterator(); -+ -+ while (iterator1.hasNext()) { -+ blockposition2 = (BlockPosition) iterator1.next(); -+ d1 = blockposition2.k(blockposition); -+ if (d1 < d0) { -+ d0 = d1; -+ blockposition3 = blockposition2; -+ } -+ } -+ -+ return blockposition3; -+ } else { -+ return null; -+ } -+ } -+ } -+ -+ protected List E_() { -+ return null; -+ } -+ -+ protected void a(World world) { -+ if (this.a == null) { -+ this.a = (PersistentStructure) world.a(PersistentStructure.class, this.a()); -+ if (this.a == null) { -+ this.a = new PersistentStructure(this.a()); -+ world.a(this.a(), (PersistentBase) this.a); -+ } else { -+ NBTTagCompound nbttagcompound = this.a.a(); -+ Iterator iterator = nbttagcompound.c().iterator(); -+ -+ while (iterator.hasNext()) { -+ String s = (String) iterator.next(); -+ NBTBase nbtbase = nbttagcompound.get(s); -+ -+ if (nbtbase.getTypeId() == 10) { -+ NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbtbase; -+ -+ if (nbttagcompound1.hasKey("ChunkX") && nbttagcompound1.hasKey("ChunkZ")) { -+ int i = nbttagcompound1.getInt("ChunkX"); -+ int j = nbttagcompound1.getInt("ChunkZ"); -+ StructureStart structurestart = WorldGenFactory.a(nbttagcompound1, world); -+ -+ if (structurestart != null) { -+ this.c.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart); -+ } -+ } -+ } -+ } -+ } -+ } -+ -+ } -+ -+ private void a(int i, int j, StructureStart structurestart) { -+ this.a.a(structurestart.a(i, j), i, j); -+ this.a.c(); -+ } -+ -+ protected abstract boolean a(int i, int j); -+ -+ protected abstract StructureStart b(int i, int j); -+} diff --git a/src/main/java/net/minecraft/server/WorldGenLargeFeature.java b/src/main/java/net/minecraft/server/WorldGenLargeFeature.java new file mode 100644 index 0000000..462dc76 @@ -2823,5 +2578,5 @@ index 0000000..31fc0a9 + } +} -- -1.9.1 +2.7.4 diff --git a/CraftBukkit-Patches/0040-Allow-Disabling-of-1.6.3-Structure-Saving.patch b/CraftBukkit-Patches/0040-Allow-Disabling-of-1.6.3-Structure-Saving.patch index 5fe115dc..6b3f6506 100644 --- a/CraftBukkit-Patches/0040-Allow-Disabling-of-1.6.3-Structure-Saving.patch +++ b/CraftBukkit-Patches/0040-Allow-Disabling-of-1.6.3-Structure-Saving.patch @@ -1,16 +1,16 @@ -From 338d1a0473ae949f6236f6eee08a016391f8d976 Mon Sep 17 00:00:00 2001 +From b0c2d26277073a253d83bbca5ccbf0d51ac2fd5a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 21 Sep 2013 12:33:09 +1000 Subject: [PATCH] Allow Disabling of 1.6.3 Structure Saving diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index dacba33..4a4d2af 100644 +index 0aa6caa..b2802c8 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -197,7 +197,13 @@ public abstract class StructureGenerator extends WorldGenBase { - protected void a(World world) { + protected synchronized void a(World world) { // CraftBukkit - synchronized if (this.a == null) { - this.a = (PersistentStructure) world.a(PersistentStructure.class, this.a()); + // Spigot Start @@ -45,5 +45,5 @@ index c2452d6..89f9bc3 100644 + } } -- -2.5.0 +2.7.4 diff --git a/CraftBukkit-Patches/0051-Prevent-Mineshaft-Saving.patch b/CraftBukkit-Patches/0051-Prevent-Mineshaft-Saving.patch index 8aff048f..ae952a7d 100644 --- a/CraftBukkit-Patches/0051-Prevent-Mineshaft-Saving.patch +++ b/CraftBukkit-Patches/0051-Prevent-Mineshaft-Saving.patch @@ -1,15 +1,15 @@ -From 27435da7261f44e7b09a250d0f30068eb7d7ea37 Mon Sep 17 00:00:00 2001 +From 0371bc0ab602553efdf2eba156eeb56e35db1c39 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 13 Dec 2013 15:21:02 +1100 Subject: [PATCH] Prevent Mineshaft Saving diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 4a4d2af..22d96e9 100644 +index b2802c8..75d616c 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -198,7 +198,7 @@ public abstract class StructureGenerator extends WorldGenBase { - protected void a(World world) { + protected synchronized void a(World world) { // CraftBukkit - synchronized if (this.a == null) { // Spigot Start - if (world.spigotConfig.saveStructureInfo) { @@ -18,5 +18,5 @@ index 4a4d2af..22d96e9 100644 } else { this.a = new PersistentStructure(this.a()); -- -2.5.0 +2.7.4 diff --git a/CraftBukkit-Patches/0074-Allow-Disabling-Creative-Item-Filter.patch b/CraftBukkit-Patches/0074-Allow-Disabling-Creative-Item-Filter.patch index d3fcfd1a..b8fa0e6e 100644 --- a/CraftBukkit-Patches/0074-Allow-Disabling-Creative-Item-Filter.patch +++ b/CraftBukkit-Patches/0074-Allow-Disabling-Creative-Item-Filter.patch @@ -1,14 +1,14 @@ -From 45f4fa5d08d2d7709d73c12d3a6a89ab82e6ce04 Mon Sep 17 00:00:00 2001 +From b25964b0fc9148e56906109785a1915161d0531c Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 12 Feb 2014 18:18:01 +1100 Subject: [PATCH] Allow Disabling Creative Item Filter diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a107029..2515ee7 100644 +index dfd2683..9f8b42a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1952,7 +1952,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { +@@ -1953,7 +1953,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() <= 45; // CraftBukkit - Add invalidItems check @@ -33,5 +33,5 @@ index 039777a..686b8bd 100644 + } } -- -2.5.0 +2.7.4 diff --git a/CraftBukkit-Patches/0096-Convert-Horses-owner-to-UUID.patch b/CraftBukkit-Patches/0096-Convert-Horses-owner-to-UUID.patch index 0b5447da..a3a14c46 100644 --- a/CraftBukkit-Patches/0096-Convert-Horses-owner-to-UUID.patch +++ b/CraftBukkit-Patches/0096-Convert-Horses-owner-to-UUID.patch @@ -1,14 +1,14 @@ -From 2dc192572acf60e2b40c07d744e06475ad6b77f8 Mon Sep 17 00:00:00 2001 +From d497571d3dae00638269334965e6161101fb5156 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 Apr 2014 01:40:30 -0400 Subject: [PATCH] Convert Horses owner to UUID diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index 17a606a..abc7120 100644 +index 8f2b353..4a08169 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java -@@ -983,6 +983,17 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu +@@ -970,6 +970,17 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu s = nbttagcompound.getString("OwnerUUID"); } else { String s1 = nbttagcompound.getString("Owner"); @@ -27,5 +27,5 @@ index 17a606a..abc7120 100644 s = NameReferencingFileConverter.a(this.h(), s1); } -- -2.5.0 +2.7.4