Archiviert
13
0
Dieser Commit ist enthalten in:
md_5 2013-12-03 15:13:39 +11:00
Ursprung 3190acce29
Commit 538ddc9cc4
17 geänderte Dateien mit 69 neuen und 173 gelöschten Zeilen

@ -1 +1 @@
Subproject commit 378718ef2e56c541cf4b4cbff3b831ae1620190e
Subproject commit 071d500e5bbbdf7d7d554cbad05117b1e358c4c2

Datei anzeigen

@ -1,4 +1,4 @@
From 226d8a6df344512bb7d00f969d8b096d2d8c3fd9 Mon Sep 17 00:00:00 2001
From 4a6f739f606ead3be6cc77376bbfebaa0fd4128d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 7 Jul 2013 09:32:53 +1000
Subject: [PATCH] Spigot Configuration
@ -34,10 +34,10 @@ index 30ce5f4..c9bb3a6 100644
if (!this.getOnlineMode()) {
h.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 67247f6..9357eb9 100644
index 0194e74..028e4ce 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -105,6 +105,7 @@ public abstract class World implements IBlockAccess {
@@ -106,6 +106,7 @@ public abstract class World implements IBlockAccess {
int lastXAccessed = Integer.MIN_VALUE;
int lastZAccessed = Integer.MIN_VALUE;
final Object chunkLock = new Object();
@ -45,7 +45,7 @@ index 67247f6..9357eb9 100644
public CraftWorld getWorld() {
return this.world;
@@ -116,6 +117,7 @@ public abstract class World implements IBlockAccess {
@@ -117,6 +118,7 @@ public abstract class World implements IBlockAccess {
// Changed signature - added gen and env
public World(IDataManager idatamanager, String s, WorldSettings worldsettings, WorldProvider worldprovider, MethodProfiler methodprofiler, ChunkGenerator gen, org.bukkit.World.Environment env) {

Datei anzeigen

@ -1,14 +1,14 @@
From 099b9e465573806de2997da7fb11ba1d6c44bb82 Mon Sep 17 00:00:00 2001
From 9b78ae248d0ceeb4a95acb67ec78185c63aaa061 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 12:56:02 +1000
Subject: [PATCH] Better Chunk Tick Selection
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9357eb9..9a2da15 100644
index 028e4ce..038aa40 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -61,7 +61,7 @@ public abstract class World implements IBlockAccess {
@@ -62,7 +62,7 @@ public abstract class World implements IBlockAccess {
public Scoreboard scoreboard = new Scoreboard(); // CraftBukkit - protected -> public
public boolean isStatic;
// CraftBukkit start - public, longhashset
@ -17,7 +17,7 @@ index 9357eb9..9a2da15 100644
private int L;
public boolean allowMonsters;
public boolean allowAnimals;
@@ -74,6 +74,30 @@ public abstract class World implements IBlockAccess {
@@ -75,6 +75,30 @@ public abstract class World implements IBlockAccess {
private boolean N;
int[] I;
@ -48,7 +48,7 @@ index 9357eb9..9a2da15 100644
public BiomeBase getBiome(int i, int j) {
if (this.isLoaded(i, 0, j)) {
Chunk chunk = this.getChunkAtWorldCoords(i, j);
@@ -123,6 +147,11 @@ public abstract class World implements IBlockAccess {
@@ -124,6 +148,11 @@ public abstract class World implements IBlockAccess {
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
// CraftBukkit end
@ -60,7 +60,7 @@ index 9357eb9..9a2da15 100644
this.L = this.random.nextInt(12000);
this.allowMonsters = true;
@@ -1896,24 +1925,44 @@ public abstract class World implements IBlockAccess {
@@ -1897,24 +1926,44 @@ public abstract class World implements IBlockAccess {
int j;
int k;

Datei anzeigen

@ -1,14 +1,14 @@
From 525c6917d05ab948ff62e430b5f383f6541fae9c Mon Sep 17 00:00:00 2001
From 65676819b50c5f6959b6d41b5504c966ec0c548a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 12:17:37 +1000
Subject: [PATCH] More Efficient GetCubes
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9a2da15..7bf2225 100644
index 038aa40..7b072dc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1015,23 +1015,42 @@ public abstract class World implements IBlockAccess {
@@ -1016,23 +1016,42 @@ public abstract class World implements IBlockAccess {
int i1 = MathHelper.floor(axisalignedbb.c);
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);

Datei anzeigen

@ -1,4 +1,4 @@
From 36e07136ffd507e8e6007b4b993711d804ccfdd1 Mon Sep 17 00:00:00 2001
From 75a381769ed3f03e1156b4ec15b64f79a87f0c20 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:46:33 +1100
Subject: [PATCH] Merge tweaks and configuration
@ -41,10 +41,10 @@ index bbcf674..08b9ac8 100644
}
} else {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7bf2225..3f9eb56 100644
index 7b072dc..76332a5 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -927,6 +927,23 @@ public abstract class World implements IBlockAccess {
@@ -928,6 +928,23 @@ public abstract class World implements IBlockAccess {
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
event = CraftEventFactory.callProjectileLaunchEvent(entity);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 2e44ad82193e6afedb8f43093e8c68eab962ef79 Mon Sep 17 00:00:00 2001
From b4e3921724da47bc30f5fb3f6db60f9ae444c180 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 7 Mar 2013 20:12:46 +1100
Subject: [PATCH] Async Operation Catching
@ -66,10 +66,10 @@ index 9f818cf..8052ea6 100644
this.trackedPlayers.remove(entityplayer);
entityplayer.removeQueue.add(Integer.valueOf(this.tracker.getId()));
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3f9eb56..b21bff3 100644
index 76332a5..5b9c6ec 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -896,6 +896,7 @@ public abstract class World implements IBlockAccess {
@@ -897,6 +897,7 @@ public abstract class World implements IBlockAccess {
}
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
@ -77,7 +77,7 @@ index 3f9eb56..b21bff3 100644
if (entity == null) return false;
// CraftBukkit end
@@ -1002,6 +1003,7 @@ public abstract class World implements IBlockAccess {
@@ -1003,6 +1004,7 @@ public abstract class World implements IBlockAccess {
}
public void removeEntity(Entity entity) {
@ -85,7 +85,7 @@ index 3f9eb56..b21bff3 100644
entity.die();
if (entity instanceof EntityHuman) {
this.players.remove(entity);
@@ -2390,6 +2392,7 @@ public abstract class World implements IBlockAccess {
@@ -2391,6 +2393,7 @@ public abstract class World implements IBlockAccess {
}
public void a(List list) {

Datei anzeigen

@ -1,14 +1,14 @@
From ee9e6ca1ffb8d21f7ba22952c3949e15f3ab3ef3 Mon Sep 17 00:00:00 2001
From 09ad256fbf9cad5e589858bcd58d7d5f63759163 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 16 Jan 2013 15:27:22 -0600
Subject: [PATCH] Sync Free Chunk Reference Cache
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b21bff3..f7fa2fe 100644
index 5b9c6ec..75fed94 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -290,20 +290,18 @@ public abstract class World implements IBlockAccess {
@@ -291,20 +291,18 @@ public abstract class World implements IBlockAccess {
return this.getChunkAt(i >> 4, j >> 4);
}

Datei anzeigen

@ -1,4 +1,4 @@
From ec7ff8fd9912318adb6bbb213fd478c7cde5f1ed Mon Sep 17 00:00:00 2001
From 8f225ceffcca2c68b7c74e1fbce53a2263257422 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Improved Timings System
@ -64,7 +64,7 @@ index fec07f8..0c1350e 100644
protected String H() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1a9df71..5a07791 100644
index b48df95..57f0280 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -10,7 +10,6 @@ import java.util.ArrayList;
@ -145,7 +145,7 @@ index 1a9df71..5a07791 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2419ac2..4e41695 100644
index 53e70c4..7a76f16 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -908,6 +908,7 @@ public class PlayerConnection implements PacketPlayInListener {
@ -198,18 +198,18 @@ index 811f1a4..3de32fe 100644
private static Map i = new HashMap();
private static Map j = new HashMap();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f7fa2fe..4a9d48b 100644
index 75fed94..33391e8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -13,6 +13,7 @@ import java.util.concurrent.Callable;
// CraftBukkit start
@@ -14,6 +14,7 @@ import java.util.concurrent.Callable;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.util.LongHashSet;
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.craftbukkit.util.UnsafeList;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.craftbukkit.CraftServer;
@@ -131,6 +132,8 @@ public abstract class World implements IBlockAccess {
@@ -132,6 +133,8 @@ public abstract class World implements IBlockAccess {
final Object chunkLock = new Object();
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
@ -218,7 +218,7 @@ index f7fa2fe..4a9d48b 100644
public CraftWorld getWorld() {
return this.world;
}
@@ -210,6 +213,7 @@ public abstract class World implements IBlockAccess {
@@ -211,6 +214,7 @@ public abstract class World implements IBlockAccess {
this.a();
this.getServer().addWorld(this.world); // CraftBukkit
@ -226,7 +226,7 @@ index f7fa2fe..4a9d48b 100644
}
protected abstract IChunkProvider j();
@@ -1242,6 +1246,7 @@ public abstract class World implements IBlockAccess {
@@ -1243,6 +1247,7 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.methodProfiler.c("regular");
@ -234,7 +234,7 @@ index f7fa2fe..4a9d48b 100644
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1264,7 +1269,9 @@ public abstract class World implements IBlockAccess {
@@ -1265,7 +1270,9 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.a("tick");
if (!entity.dead) {
try {
@ -244,7 +244,7 @@ index f7fa2fe..4a9d48b 100644
} catch (Throwable throwable1) {
crashreport = CrashReport.a(throwable1, "Ticking entity");
crashreportsystemdetails = crashreport.a("Entity being ticked");
@@ -1289,7 +1296,9 @@ public abstract class World implements IBlockAccess {
@@ -1290,7 +1297,9 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
}
@ -254,7 +254,7 @@ index f7fa2fe..4a9d48b 100644
this.N = true;
Iterator iterator = this.tileEntityList.iterator();
@@ -1304,8 +1313,11 @@ public abstract class World implements IBlockAccess {
@@ -1305,8 +1314,11 @@ public abstract class World implements IBlockAccess {
if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) {
try {
@ -266,7 +266,7 @@ index f7fa2fe..4a9d48b 100644
crashreport = CrashReport.a(throwable2, "Ticking block entity");
crashreportsystemdetails = crashreport.a("Block entity being ticked");
tileentity.a(crashreportsystemdetails);
@@ -1325,6 +1337,8 @@ public abstract class World implements IBlockAccess {
@@ -1326,6 +1338,8 @@ public abstract class World implements IBlockAccess {
}
}
@ -275,7 +275,7 @@ index f7fa2fe..4a9d48b 100644
this.N = false;
if (!this.b.isEmpty()) {
this.tileEntityList.removeAll(this.b);
@@ -1363,6 +1377,7 @@ public abstract class World implements IBlockAccess {
@@ -1364,6 +1378,7 @@ public abstract class World implements IBlockAccess {
this.a.clear();
}
@ -283,7 +283,7 @@ index f7fa2fe..4a9d48b 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1385,6 +1400,7 @@ public abstract class World implements IBlockAccess {
@@ -1386,6 +1401,7 @@ public abstract class World implements IBlockAccess {
byte b0 = 32;
if (!flag || this.b(i - b0, 0, j - b0, i + b0, 0, j + b0)) {
@ -291,7 +291,7 @@ index f7fa2fe..4a9d48b 100644
entity.T = entity.locX;
entity.U = entity.locY;
entity.V = entity.locZ;
@@ -1446,6 +1462,7 @@ public abstract class World implements IBlockAccess {
@@ -1447,6 +1463,7 @@ public abstract class World implements IBlockAccess {
entity.passenger = null;
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From da4488dbd8e31eac4c10fd45a7689dccd26f6b5a Mon Sep 17 00:00:00 2001
From dd4e2af391bd05aee39b5e0320275be59587b063 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 16 May 2013 18:51:05 +1000
Subject: [PATCH] Orebfuscator
@ -103,7 +103,7 @@ index 3eac231..c3cfdc7 100644
Deflater deflater = localDeflater.get();
deflater.reset();
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 3028404..e24d4b5 100644
index bceba7b..c963fac 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -173,6 +173,7 @@ public class PlayerInteractManager {
@ -115,10 +115,10 @@ index 3028404..e24d4b5 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 4a9d48b..7f8d224 100644
index 33391e8..fde1939 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -464,6 +464,7 @@ public abstract class World implements IBlockAccess {
@@ -465,6 +465,7 @@ public abstract class World implements IBlockAccess {
this.e(i, j + 1, k, block);
this.e(i, j, k - 1, block);
this.e(i, j, k + 1, block);

Datei anzeigen

@ -1,14 +1,14 @@
From b534c64219838baa8bf4a35daa5a69e4ba414c3e Mon Sep 17 00:00:00 2001
From 3bccc2c884c6ebf06e146c254577a772188c2025 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 09:20:19 +1100
Subject: [PATCH] Handle Null Tile Entities
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7f8d224..60c78d2 100644
index fde1939..491d0b0 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1305,6 +1305,13 @@ public abstract class World implements IBlockAccess {
@@ -1306,6 +1306,13 @@ public abstract class World implements IBlockAccess {
while (iterator.hasNext()) {
TileEntity tileentity = (TileEntity) iterator.next();

Datei anzeigen

@ -1,4 +1,4 @@
From 2241fc88484109e7c539e3fb8d6822fbc90bc359 Mon Sep 17 00:00:00 2001
From 7209fac192b5c615586cb72bc9dd8367f27515c9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Feb 2013 05:10:21 -0500
Subject: [PATCH] Entity Activation Range
@ -116,10 +116,10 @@ index 75b1ec1..a61001d 100644
public EntityLiving(World world) {
super(world);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 60c78d2..3108628 100644
index 491d0b0..6965e82 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1247,6 +1247,7 @@ public abstract class World implements IBlockAccess {
@@ -1248,6 +1248,7 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.methodProfiler.c("regular");
@ -127,7 +127,7 @@ index 60c78d2..3108628 100644
timings.entityTick.startTiming(); // Spigot
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1407,7 +1408,11 @@ public abstract class World implements IBlockAccess {
@@ -1408,7 +1409,11 @@ public abstract class World implements IBlockAccess {
int j = MathHelper.floor(entity.locZ);
byte b0 = 32;

Datei anzeigen

@ -1,14 +1,14 @@
From 3a0cee96b7a2ad5126b13d9fbb1012936889d61a Mon Sep 17 00:00:00 2001
From b2ea34ea89dc267a6d37767a937693c4915a34ae Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 22 Jun 2013 16:12:02 +1000
Subject: [PATCH] Allow Disabling of Random Lighting Updates
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3108628..baa5d55 100644
index 6965e82..6997d03 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2037,7 +2037,7 @@ public abstract class World implements IBlockAccess {
@@ -2038,7 +2038,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.a("playerCheckLight");

Datei anzeigen

@ -1,4 +1,4 @@
From e162863cd42ceef3bd6333aa4c7c05b632b7536e Mon Sep 17 00:00:00 2001
From 5b18671598657ab57b3d4604052bbc09cbeae7b7 Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com>
Date: Tue, 16 Jul 2013 03:32:32 +0500
Subject: [PATCH] Entity ticking chunk caching
@ -6,10 +6,10 @@ Subject: [PATCH] Entity ticking chunk caching
Cache known loaded chunks so we avoid making a potentially expensive contains call for every single entity in exchange for some simple arithmetic. Best case scenario, this cuts down contains call to once per chunk, worst case it adds on some simple arithmetic operations
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index baa5d55..c4978f6 100644
index 6997d03..b09220f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1192,6 +1192,7 @@ public abstract class World implements IBlockAccess {
@@ -1193,6 +1193,7 @@ public abstract class World implements IBlockAccess {
CrashReport crashreport;
CrashReportSystemDetails crashreportsystemdetails;
@ -17,7 +17,7 @@ index baa5d55..c4978f6 100644
for (i = 0; i < this.i.size(); ++i) {
entity = (Entity) this.i.get(i);
// CraftBukkit start - Fixed an NPE, don't process entities in chunks queued for unload
@@ -1200,10 +1201,15 @@ public abstract class World implements IBlockAccess {
@@ -1201,10 +1202,15 @@ public abstract class World implements IBlockAccess {
}
ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer;
@ -35,7 +35,7 @@ index baa5d55..c4978f6 100644
try {
++entity.ticksLived;
@@ -1224,6 +1230,7 @@ public abstract class World implements IBlockAccess {
@@ -1225,6 +1231,7 @@ public abstract class World implements IBlockAccess {
this.i.remove(i--);
}
}
@ -43,7 +43,7 @@ index baa5d55..c4978f6 100644
this.methodProfiler.c("remove");
this.entityList.removeAll(this.f);
@@ -1254,10 +1261,15 @@ public abstract class World implements IBlockAccess {
@@ -1255,10 +1262,15 @@ public abstract class World implements IBlockAccess {
// CraftBukkit start - Don't tick entities in chunks queued for unload
ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer;

Datei anzeigen

@ -1,14 +1,14 @@
From 087cdf3dccb090d91f466081a2834de2854d307c Mon Sep 17 00:00:00 2001
From 037d74366dc04180af0676da0c4c4ecbf09046fc Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com>
Date: Sat, 3 Aug 2013 21:42:00 +0500
Subject: [PATCH] Guard entity list
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index c4978f6..81534e3 100644
index b09220f..29907b2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -29,7 +29,25 @@ import org.bukkit.event.weather.ThunderChangeEvent;
@@ -30,7 +30,25 @@ import org.bukkit.event.weather.ThunderChangeEvent;
public abstract class World implements IBlockAccess {
public boolean d;
@ -35,7 +35,7 @@ index c4978f6..81534e3 100644
protected List f = new ArrayList();
public Set tileEntityList = new HashSet(); // CraftBukkit - ArrayList -> HashSet
private List a = new ArrayList();
@@ -76,6 +94,7 @@ public abstract class World implements IBlockAccess {
@@ -77,6 +95,7 @@ public abstract class World implements IBlockAccess {
int[] I;
// Spigot start
@ -43,7 +43,7 @@ index c4978f6..81534e3 100644
protected final gnu.trove.map.hash.TLongShortHashMap chunkTickList;
protected float growthOdds = 100;
protected float modifiedOdds = 100;
@@ -1256,6 +1275,7 @@ public abstract class World implements IBlockAccess {
@@ -1257,6 +1276,7 @@ public abstract class World implements IBlockAccess {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot
@ -51,7 +51,7 @@ index c4978f6..81534e3 100644
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1303,12 +1323,15 @@ public abstract class World implements IBlockAccess {
@@ -1304,12 +1324,15 @@ public abstract class World implements IBlockAccess {
this.getChunkAt(j, k).b(entity);
}

Datei anzeigen

@ -1,4 +1,4 @@
From ca5f15289441bb09a433e1fc6560626ffb144b06 Mon Sep 17 00:00:00 2001
From 182bdca43850526f000bb50e3c55b3f8bee4c154 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 3 Dec 2013 11:07:48 +1100
Subject: [PATCH] Clear Flower Pot on Drop

Datei anzeigen

@ -1,104 +0,0 @@
From 0cbb25b5699b0b1aa771a4f7b06d4f61f71ee785 Mon Sep 17 00:00:00 2001
From: toastedtruth <brammero@gmail.com>
Date: Sun, 1 Dec 2013 23:18:16 +0000
Subject: [PATCH] Fix some recipe book bugs
Fix written books crashing the server. Fixes BUKKIT-4945
Fix BlockCanBuildEvent returning null. Fixes BUKKIT-4972
Due to obfuscation changes in 1.7.2, "l" is now the Material ID.
i j and k became the x y z coordinates, resulting in no ID being matched
for the Material.
This is corrected by swapping the values into the correct order.
diff --git a/src/main/java/net/minecraft/server/RecipeBookClone.java b/src/main/java/net/minecraft/server/RecipeBookClone.java
new file mode 100644
index 0000000..8182a5f
--- /dev/null
+++ b/src/main/java/net/minecraft/server/RecipeBookClone.java
@@ -0,0 +1,68 @@
+package net.minecraft.server;
+
+public class RecipeBookClone extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
+
+ // CraftBukkit start - Delegate to new parent class
+ public RecipeBookClone() {
+ super(new ItemStack(Items.WRITTEN_BOOK, 0, -1), java.util.Arrays.asList(new ItemStack(Items.BOOK_AND_QUILL, 0, 0)));
+ }
+ // CraftBukkit end
+
+ public boolean a(InventoryCrafting inventoryCrafting, World paramWorld) {
+ int i = 0;
+ ItemStack itemStack = null;
+ for (int j = 0; j < inventoryCrafting.getSize(); j++) {
+ ItemStack itemStack1 = inventoryCrafting.getItem(j);
+ if (itemStack1 != null) {
+ if (itemStack1.getItem() == Items.WRITTEN_BOOK) {
+ if (itemStack != null) {
+ return false;
+ }
+ itemStack = itemStack1;
+ } else if (itemStack1.getItem() == Items.BOOK_AND_QUILL) {
+ i++;
+ } else {
+ return false;
+ }
+ }
+ }
+ return (itemStack != null) && (i > 0);
+ }
+
+ public ItemStack a(InventoryCrafting inventoryCrafting) {
+ int i = 0;
+ ItemStack itemStack = null;
+ for (int j = 0; j < inventoryCrafting.getSize(); j++) {
+ ItemStack itemStack2 = inventoryCrafting.getItem(j);
+ if (itemStack2 != null) {
+ if (itemStack2.getItem() == Items.WRITTEN_BOOK) {
+ if (itemStack != null) {
+ return null;
+ }
+ itemStack = itemStack2;
+ } else if (itemStack2.getItem() == Items.BOOK_AND_QUILL) {
+ i++;
+ } else {
+ return null;
+ }
+ }
+ }
+ if ((itemStack == null) || (i < 1)) {
+ return null;
+ }
+ ItemStack itemStack1 = new ItemStack(Items.WRITTEN_BOOK, i + 1);
+ itemStack1.setTag((NBTTagCompound) itemStack.getTag().clone());
+ if (itemStack.hasName()) {
+ itemStack1.c(itemStack.getName());
+ }
+ return itemStack1;
+ }
+
+ public int a() {
+ return 9;
+ }
+
+ public ItemStack b() {
+ return null;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 81534e3..858004e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2483,7 +2483,7 @@ public abstract class World implements IBlockAccess {
boolean defaultReturn = axisalignedbb != null && !this.a(axisalignedbb, entity) ? false : (block1.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : block1.getMaterial().isReplaceable() && block.canPlace(this, i, j, k, l, itemstack));
// CraftBukkit start
- BlockCanBuildEvent event = new BlockCanBuildEvent(this.getWorld().getBlockAt(j, k, l), i, defaultReturn);
+ BlockCanBuildEvent event = new BlockCanBuildEvent(this.getWorld().getBlockAt(i, j, k), l, defaultReturn);
this.getServer().getPluginManager().callEvent(event);
return event.isBuildable();
--
1.8.3.2

Datei anzeigen

@ -1,4 +1,4 @@
From bccdbf4d063f1489e3075fc3a904a7c956ecdc99 Mon Sep 17 00:00:00 2001
From b287b9c8253f8449b62c3aba03708c6189cca65a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 3 Dec 2013 11:28:32 +1100
Subject: [PATCH] Fix Huge Mushroom Caps