[Cleanup] Update merge patches.

This commit is contained in:
md_5 2013-03-23 09:48:22 +11:00
parent dca885cdb8
commit 6b53aa10e3
40 changed files with 261 additions and 399 deletions

View File

@ -1,11 +1,11 @@
From 5431f8ebb3020558e602456d8658e58e20dbe5f6 Mon Sep 17 00:00:00 2001
From d004dd8e2788cce2d6af393d256ba22c77bf4cd5 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:27:15 +1100
Date: Sat, 23 Mar 2013 09:39:40 +1100
Subject: [PATCH] Spigot changes.
---
.gitignore | 2 +
src/main/java/net/minecraft/server/Block.java | 12 ++
src/main/java/net/minecraft/server/Block.java | 12 +++
.../java/net/minecraft/server/BlockCactus.java | 2 +-
src/main/java/net/minecraft/server/BlockCrops.java | 2 +-
src/main/java/net/minecraft/server/BlockGrass.java | 2 +-
@ -14,22 +14,22 @@ Subject: [PATCH] Spigot changes.
src/main/java/net/minecraft/server/BlockReed.java | 2 +-
.../java/net/minecraft/server/BlockSapling.java | 2 +-
src/main/java/net/minecraft/server/BlockStem.java | 2 +-
.../net/minecraft/server/ChunkRegionLoader.java | 35 +++--
.../java/net/minecraft/server/ChunkSection.java | 31 ++++-
.../net/minecraft/server/ChunkRegionLoader.java | 35 +++++--
.../java/net/minecraft/server/ChunkSection.java | 31 ++++--
src/main/java/net/minecraft/server/EntityItem.java | 3 +-
.../java/net/minecraft/server/EntitySquid.java | 4 -
.../net/minecraft/server/PlayerConnection.java | 18 ++-
.../net/minecraft/server/PlayerConnection.java | 18 +++-
src/main/java/net/minecraft/server/PlayerList.java | 10 +-
.../net/minecraft/server/ThreadLoginVerifier.java | 21 +++
src/main/java/net/minecraft/server/World.java | 152 ++++++++++++++++++---
.../java/net/minecraft/server/WorldServer.java | 36 ++++-
.../java/org/bukkit/craftbukkit/CraftServer.java | 47 ++++---
.../java/org/bukkit/craftbukkit/CraftWorld.java | 76 ++++++++++-
src/main/java/org/bukkit/craftbukkit/Spigot.java | 20 +++
.../net/minecraft/server/ThreadLoginVerifier.java | 21 ++++
src/main/java/net/minecraft/server/World.java | 111 +++++++++++++++++----
.../java/net/minecraft/server/WorldServer.java | 36 ++++++-
.../java/org/bukkit/craftbukkit/CraftServer.java | 47 +++++----
.../java/org/bukkit/craftbukkit/CraftWorld.java | 68 ++++++++++++-
src/main/java/org/bukkit/craftbukkit/Spigot.java | 20 ++++
.../craftbukkit/chunkio/ChunkIOProvider.java | 2 +-
.../org/bukkit/craftbukkit/entity/CraftPlayer.java | 7 +
src/main/resources/configurations/bukkit.yml | 27 ++++
25 files changed, 441 insertions(+), 78 deletions(-)
.../org/bukkit/craftbukkit/entity/CraftPlayer.java | 7 ++
src/main/resources/configurations/bukkit.yml | 25 +++++
25 files changed, 390 insertions(+), 78 deletions(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java
diff --git a/.gitignore b/.gitignore
@ -463,7 +463,7 @@ index 0686ba0..c185f64 100644
URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b694789..134ab73 100644
index b694789..2f8e066 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -67,14 +67,27 @@ public abstract class World implements IBlockAccess {
@ -531,55 +531,7 @@ index b694789..134ab73 100644
if (worldprovider != null) {
this.worldProvider = worldprovider;
} else if (this.worldData != null && this.worldData.j() != 0) {
@@ -925,6 +946,47 @@ public abstract class World implements IBlockAccess {
event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity, spawnReason);
} else if (entity instanceof EntityItem) {
event = CraftEventFactory.callItemSpawnEvent((EntityItem) entity);
+ // Spigot start
+ ItemStack item = ((EntityItem) entity).getItemStack();
+ int maxSize = item.getMaxStackSize();
+ if (item.count < maxSize) {
+ double radius = this.getWorld().itemMergeRadius;
+ if (radius > 0) {
+ List<Entity> entities = this.getEntities(entity, entity.boundingBox.grow(radius, radius, radius));
+ for (Entity e : entities) {
+ if (e instanceof EntityItem) {
+ EntityItem loopItem = (EntityItem) e;
+ ItemStack loopStack = loopItem.getItemStack();
+ if (!loopItem.dead && loopStack.id == item.id && loopStack.getData() == item.getData()) {
+ if (loopStack.tag == null || item.tag == null || !loopStack.tag.equals(item.tag)) {
+ int toAdd = Math.min(loopStack.count, maxSize - item.count);
+ item.count += toAdd;
+ loopStack.count -= toAdd;
+ if (loopStack.count <= 0) {
+ loopItem.die();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } else if (entity instanceof EntityExperienceOrb) {
+ EntityExperienceOrb xp = (EntityExperienceOrb) entity;
+ double radius = this.getWorld().expMergeRadius;
+ if (radius > 0) {
+ List<Entity> entities = this.getEntities(entity, entity.boundingBox.grow(radius, radius, radius));
+ for (Entity e : entities) {
+ if (e instanceof EntityExperienceOrb) {
+ EntityExperienceOrb loopItem = (EntityExperienceOrb) e;
+ if (!loopItem.dead) {
+ xp.value += loopItem.value;
+ loopItem.die();
+ }
+ }
+ }
+ }
+ // Spigot end
} else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) {
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
event = CraftEventFactory.callProjectileLaunchEvent(entity);
@@ -1017,6 +1079,39 @@ public abstract class World implements IBlockAccess {
@@ -1017,6 +1038,39 @@ public abstract class World implements IBlockAccess {
int i1 = MathHelper.floor(axisalignedbb.c);
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);
@ -619,7 +571,7 @@ index b694789..134ab73 100644
for (int k1 = i; k1 < j; ++k1) {
for (int l1 = i1; l1 < j1; ++l1) {
if (this.isLoaded(k1, 64, l1)) {
@@ -1030,6 +1125,7 @@ public abstract class World implements IBlockAccess {
@@ -1030,6 +1084,7 @@ public abstract class World implements IBlockAccess {
}
}
}
@ -627,7 +579,7 @@ index b694789..134ab73 100644
double d0 = 0.25D;
List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0));
@@ -1946,6 +2042,11 @@ public abstract class World implements IBlockAccess {
@@ -1946,6 +2001,11 @@ public abstract class World implements IBlockAccess {
this.worldData.setWeatherDuration(1);
}
@ -639,7 +591,7 @@ index b694789..134ab73 100644
protected void A() {
// this.chunkTickList.clear(); // CraftBukkit - removed
this.methodProfiler.a("buildList");
@@ -1955,25 +2056,42 @@ public abstract class World implements IBlockAccess {
@@ -1955,25 +2015,42 @@ public abstract class World implements IBlockAccess {
int j;
int k;
@ -696,7 +648,7 @@ index b694789..134ab73 100644
this.methodProfiler.b();
if (this.O > 0) {
@@ -1981,7 +2099,7 @@ public abstract class World implements IBlockAccess {
@@ -1981,7 +2058,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.a("playerCheckLight");
@ -906,10 +858,10 @@ index 6b3b9fe..872c4ac 100644
player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command");
getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index adb2bba..3dc6f0e 100644
index adb2bba..b510748 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -77,7 +77,81 @@ public class CraftWorld implements World {
@@ -77,7 +77,73 @@ public class CraftWorld implements World {
if (server.chunkGCPeriod > 0) {
chunkGCTickCount = rand.nextInt(server.chunkGCPeriod);
}
@ -923,10 +875,8 @@ index adb2bba..3dc6f0e 100644
+ name = world.worldData.getName().replaceAll(" ", "_");
+ }
+
+ //load defaults first
+ // load defaults first
+ growthPerTick = configuration.getInt("world-settings.default.growth-chunks-per-tick", growthPerTick);
+ itemMergeRadius = configuration.getDouble("world-settings.default.item-merge-radius", itemMergeRadius);
+ expMergeRadius = configuration.getDouble("world-settings.default.exp-merge-radius", expMergeRadius);
+ randomLightingUpdates = configuration.getBoolean("world-settings.default.random-light-updates", randomLightingUpdates);
+ mobSpawnRange = configuration.getInt("world-settings.default.mob-spawn-range", mobSpawnRange);
+ aggregateTicks = Math.max(1, configuration.getInt("world-settings.default.aggregate-chunkticks", aggregateTicks));
@ -941,8 +891,6 @@ index adb2bba..3dc6f0e 100644
+
+ //override defaults with world specific, if they exist
+ growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick);
+ itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius);
+ expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius);
+ randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates);
+ mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange);
+ aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks));
@ -958,8 +906,6 @@ index adb2bba..3dc6f0e 100644
+ server.getLogger().info("-------------- Spigot ----------------");
+ server.getLogger().info("-------- World Settings For [" + name + "] --------");
+ server.getLogger().info("Growth Per Chunk: " + growthPerTick);
+ server.getLogger().info("Item Merge Radius: " + itemMergeRadius);
+ server.getLogger().info("Experience Merge Radius: " + expMergeRadius);
+ server.getLogger().info("Random Lighting Updates: " + randomLightingUpdates);
+ server.getLogger().info("Mob Spawn Range: " + mobSpawnRange);
+ server.getLogger().info("Aggregate Ticks: " + aggregateTicks);
@ -975,8 +921,6 @@ index adb2bba..3dc6f0e 100644
+ }
+ // Spigot Start
+ public int growthPerTick = 650;
+ public double itemMergeRadius = 3;
+ public double expMergeRadius = 3;
+ public boolean randomLightingUpdates = false;
+ public int mobSpawnRange = 4;
+ public int aggregateTicks = 4;
@ -1054,10 +998,10 @@ index 70111e7..1871d3e 100644
public void setCompassTarget(Location loc) {
if (getHandle().playerConnection == null) return;
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 61a95e3..f44d5d0 100644
index 61a95e3..58501ea 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -25,6 +25,33 @@ settings:
@@ -25,6 +25,31 @@ settings:
query-plugins: true
deprecated-verbose: default
shutdown-message: Server closed
@ -1071,8 +1015,6 @@ index 61a95e3..f44d5d0 100644
+ default:
+ growth-chunks-per-tick: 650
+ mob-spawn-range: 4
+ item-merge-radius: 3.5
+ exp-merge-radius: 3.5
+ random-light-updates: false
+ aggregate-chunkticks: 4
+ wheat-growth-modifier: 100

View File

@ -0,0 +1,123 @@
From 9cfdf2543e6a7f7d485373d50496426132fbe161 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
This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players.
---
src/main/java/net/minecraft/server/EntityItem.java | 17 +++++++++++------
src/main/java/net/minecraft/server/World.java | 17 +++++++++++++++++
src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 6 ++++++
src/main/resources/configurations/bukkit.yml | 2 ++
4 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index aa8d83f..6d54e97 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -114,7 +114,10 @@ public class EntityItem extends Entity {
}
private void g() {
- Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(0.5D, 0.0D, 0.5D)).iterator();
+ // Spigot start
+ double radius = world.getWorld().itemMergeRadius;
+ Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(radius, radius, radius)).iterator();
+ // Spigot end
while (iterator.hasNext()) {
EntityItem entityitem = (EntityItem) iterator.next();
@@ -143,11 +146,13 @@ public class EntityItem extends Entity {
} else if (itemstack1.count + itemstack.count > itemstack1.getMaxStackSize()) {
return false;
} else {
- itemstack1.count += itemstack.count;
- entityitem.pickupDelay = Math.max(entityitem.pickupDelay, this.pickupDelay);
- entityitem.age = Math.min(entityitem.age, this.age);
- entityitem.setItemStack(itemstack1);
- this.die();
+ // Spigot start
+ itemstack.count += itemstack1.count;
+ this.pickupDelay = Math.max(entityitem.pickupDelay, this.pickupDelay);
+ this.age = Math.min(entityitem.age, this.age);
+ this.setItemStack(itemstack);
+ entityitem.die();
+ // Spigot end
return true;
}
} else {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2f8e066..0c378e7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -950,6 +950,23 @@ public abstract class World implements IBlockAccess {
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
event = CraftEventFactory.callProjectileLaunchEvent(entity);
}
+ // Spigot start
+ else if (entity instanceof EntityExperienceOrb) {
+ EntityExperienceOrb xp = (EntityExperienceOrb) entity;
+ double radius = this.getWorld().expMergeRadius;
+ if (radius > 0) {
+ List<Entity> entities = this.getEntities(entity, entity.boundingBox.grow(radius, radius, radius));
+ for (Entity e : entities) {
+ if (e instanceof EntityExperienceOrb) {
+ EntityExperienceOrb loopItem = (EntityExperienceOrb) e;
+ if (!loopItem.dead) {
+ xp.value += loopItem.value;
+ loopItem.die();
+ }
+ }
+ }
+ }
+ } // Spigot end
if (event != null && (event.isCancelled() || entity.dead)) {
entity.dead = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b510748..9343d46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -91,6 +91,8 @@ public class CraftWorld implements World {
randomLightingUpdates = configuration.getBoolean("world-settings.default.random-light-updates", randomLightingUpdates);
mobSpawnRange = configuration.getInt("world-settings.default.mob-spawn-range", mobSpawnRange);
aggregateTicks = Math.max(1, configuration.getInt("world-settings.default.aggregate-chunkticks", aggregateTicks));
+ itemMergeRadius = configuration.getDouble("world-settings.default.item-merge-radius", itemMergeRadius);
+ expMergeRadius = configuration.getDouble("world-settings.default.exp-merge-radius", expMergeRadius);
wheatGrowthModifier = configuration.getInt("world-settings.default.wheat-growth-modifier", wheatGrowthModifier);
cactusGrowthModifier = configuration.getInt("world-settings.default.cactus-growth-modifier", cactusGrowthModifier);
@@ -105,6 +107,8 @@ public class CraftWorld implements World {
randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates);
mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange);
aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks));
+ itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius);
+ expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius);
wheatGrowthModifier = configuration.getInt("world-settings." + name + ".wheat-growth-modifier", wheatGrowthModifier);
cactusGrowthModifier = configuration.getInt("world-settings." + name + ".cactus-growth-modifier", cactusGrowthModifier);
@@ -135,6 +139,8 @@ public class CraftWorld implements World {
public boolean randomLightingUpdates = false;
public int mobSpawnRange = 4;
public int aggregateTicks = 4;
+ public double itemMergeRadius = 3.5;
+ public double expMergeRadius = 3.5;
//Crop growth rates:
public int wheatGrowthModifier = 100;
public int cactusGrowthModifier = 100;
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 58501ea..87f9f1c 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -37,6 +37,8 @@ world-settings:
mob-spawn-range: 4
random-light-updates: false
aggregate-chunkticks: 4
+ item-merge-radius: 3.5
+ exp-merge-radius: 3.5
wheat-growth-modifier: 100
cactus-growth-modifier: 100
melon-growth-modifier: 100
--
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 47b8bac863a322c7431cca649eb4050910b3cc2c Mon Sep 17 00:00:00 2001
From c114c3c71690f5c0dc640083c263062a776c92aa Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:29:43 +1100
Subject: [PATCH] LongHash Tweaks.

View File

@ -1,4 +1,4 @@
From 5dcb300e7971cc649311c94ca51859f6c7d2411f Mon Sep 17 00:00:00 2001
From cb3fe928074c99b3f092d87eac6c36df494fcce1 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Sun, 23 Dec 2012 17:09:40 +1100
Subject: [PATCH] Address BUKKIT-3286 by firing the inventory close event when

View File

@ -1,45 +0,0 @@
From af7cc23dd2d34c8d0c4a26d860dbf7b4110eb331 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Sun, 23 Dec 2012 17:51:07 +1100
Subject: [PATCH] Update item merge logic
---
src/main/java/net/minecraft/server/World.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 134ab73..d78d948 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -948,6 +948,7 @@ public abstract class World implements IBlockAccess {
event = CraftEventFactory.callItemSpawnEvent((EntityItem) entity);
// Spigot start
ItemStack item = ((EntityItem) entity).getItemStack();
+ org.bukkit.craftbukkit.inventory.CraftItemStack craft = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(item);
int maxSize = item.getMaxStackSize();
if (item.count < maxSize) {
double radius = this.getWorld().itemMergeRadius;
@@ -957,14 +958,12 @@ public abstract class World implements IBlockAccess {
if (e instanceof EntityItem) {
EntityItem loopItem = (EntityItem) e;
ItemStack loopStack = loopItem.getItemStack();
- if (!loopItem.dead && loopStack.id == item.id && loopStack.getData() == item.getData()) {
- if (loopStack.tag == null || item.tag == null || !loopStack.tag.equals(item.tag)) {
- int toAdd = Math.min(loopStack.count, maxSize - item.count);
- item.count += toAdd;
- loopStack.count -= toAdd;
- if (loopStack.count <= 0) {
- loopItem.die();
- }
+ if (!loopItem.dead && craft.isSimilar(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(loopStack))) {
+ int toAdd = Math.min(loopStack.count, maxSize - item.count);
+ item.count += toAdd;
+ loopStack.count -= toAdd;
+ if (loopStack.count <= 0) {
+ loopItem.die();
}
}
}
--
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 944c9cf3316f1961ddeadbcd2b6dd87ae0b9ef39 Mon Sep 17 00:00:00 2001
From 77ad92ad7538ee1646e4718f4458fa737b053795 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 11 Jan 2013 11:08:45 -0500
Subject: [PATCH] Fix various crop growth modifier formula issues
@ -107,5 +107,5 @@ index a945ee4..c17ce36 100644
if (l < 7) {
--
1.8.2
1.8.1-rc2

View File

@ -1,69 +0,0 @@
From 3c5dece19abe1d7cdc329f0520507cdc228ac9a6 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Sat, 12 Jan 2013 19:57:45 +1100
Subject: [PATCH] Per world view distance.
---
src/main/java/net/minecraft/server/WorldServer.java | 2 +-
src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 5 +++++
src/main/resources/configurations/bukkit.yml | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 05b2d6d..9902506 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -51,7 +51,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
// CraftBukkit end
this.server = minecraftserver;
this.tracker = new EntityTracker(this);
- this.manager = new PlayerChunkMap(this, minecraftserver.getPlayerList().o());
+ this.manager = new PlayerChunkMap(this, getWorld().viewDistance); // Spigot
if (this.entitiesById == null) {
this.entitiesById = new IntHashMap();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3dc6f0e..0261647 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -118,6 +118,9 @@ public class CraftWorld implements World {
treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier);
mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier);
+ viewDistance = Bukkit.getServer().getViewDistance();
+ viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance);
+
server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick);
@@ -133,6 +136,7 @@ public class CraftWorld implements World {
server.getLogger().info("Sugar Growth Modifier: " + sugarGrowthModifier);
server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
+ server.getLogger().info("View distance: " + viewDistance);
server.getLogger().info("-------------------------------------------------");
// Spigot end
}
@@ -143,6 +147,7 @@ public class CraftWorld implements World {
public boolean randomLightingUpdates = false;
public int mobSpawnRange = 4;
public int aggregateTicks = 4;
+ public int viewDistance;
//Crop growth rates:
public int wheatGrowthModifier = 100;
public int cactusGrowthModifier = 100;
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index f44d5d0..0c92b66 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -49,6 +49,7 @@ world-settings:
world:
growth-chunks-per-tick: 1000
world_nether:
+ view-distance: 5
growth-chunks-per-tick: 0
random-light-updates: true
water-creatures-per-chunk: 0
--
1.8.2

View File

@ -1,4 +1,4 @@
From 6736c6beeaf81c42417d2b70316a4d9497796631 Mon Sep 17 00:00:00 2001
From 91c1376c40f1b65590c3904c0f3568bcd9393805 Mon Sep 17 00:00:00 2001
From: Agaricus <agaricusb@yahoo.com>
Date: Sun, 13 Jan 2013 03:41:38 -0800
Subject: [PATCH] Add OldChunkLoader from mc-dev for diff visibility
@ -136,5 +136,5 @@ index 0000000..65b0b70
+}
\ No newline at end of file
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 5156a810ad9b2fc85ce8145089b0b7264f4359aa Mon Sep 17 00:00:00 2001
From fcd0a70b968940344581a96d14343b507f36f492 Mon Sep 17 00:00:00 2001
From: Agaricus <agaricusb@yahoo.com>
Date: Sun, 13 Jan 2013 03:49:07 -0800
Subject: [PATCH] Fix mcRegion-to-Anvil conversion
@ -27,5 +27,5 @@ index 65b0b70..0b3bd0d 100644
}
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From f08eb8edd56e05b7d43deffd5bcd2f4caaaeedfb Mon Sep 17 00:00:00 2001
From 0f82033d1a429b38e007692571d568d700e0f2d0 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Tue, 15 Jan 2013 15:05:02 +1100
Subject: [PATCH] Update versioning check to correctly resolve api version.
@ -21,5 +21,5 @@ index f905d17..9304637 100644
if (stream != null) {
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 9aed14ce3aea2598f458a7fc7cffa3df5c777a41 Mon Sep 17 00:00:00 2001
From 312d229f498566d9727dd5bc1aa130ee2767a427 Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com>
Date: Fri, 18 Jan 2013 16:20:01 +0500
Subject: [PATCH] Optimize packet used to unload chunks for the client
@ -52,5 +52,5 @@ index 5350644..185a609 100644
entityplayer.chunkCoordIntPairQueue.remove(this.location);
if (this.b.isEmpty()) {
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From cf02ddea09cb72c52bb42a66c8fd70ec0726de4c Mon Sep 17 00:00:00 2001
From d6399ccd17ce4c3af3f1c9193080f12fddd7b2ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 19 Jan 2013 01:11:30 -0500
Subject: [PATCH] Skip entity.move() if we are not moving anywhere.
@ -20,5 +20,5 @@ index 2e7cb43..fabe3ab 100644
this.boundingBox.d(d0, d1, d2);
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 1222e0b3be125bf5cabb00b3df7df8922862e27f Mon Sep 17 00:00:00 2001
From aa6762884aa5711a67c9aef0d4075cdc2038e0a2 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 16 Jan 2013 15:27:22 -0600
Subject: [PATCH] Alternate, sync-free-but-safe chunk reference cache
@ -8,7 +8,7 @@ Subject: [PATCH] Alternate, sync-free-but-safe chunk reference cache
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d78d948..9b4cc07 100644
index 0c378e7..7862b43 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -294,15 +294,13 @@ public abstract class World implements IBlockAccess {
@ -34,5 +34,5 @@ index d78d948..9b4cc07 100644
}
// CraftBukkit end
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 98acdcd33169b89021c3f821446f5b91f48e477b Mon Sep 17 00:00:00 2001
From fc42dccd299521795dd9b98199195524a6a78d4c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 12:28:17 +1100
Subject: [PATCH] Tick loop optimization - sleep for as long as possible.
@ -136,5 +136,5 @@ index 0000000..f114a31
+ }
+}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 880ea9bc4fc136931a5a93eff3e88291503cef3f Mon Sep 17 00:00:00 2001
From 2d4715065524fceccd18aa9f34aebf20ed3a6325 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
@ -279,7 +279,7 @@ index db3fc42..174546d 100644
private static Map b = new HashMap();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9b4cc07..b5c5e36 100644
index 7862b43..dd61607 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;
@ -307,7 +307,7 @@ index 9b4cc07..b5c5e36 100644
}
protected abstract IChunkProvider j();
@@ -1293,6 +1297,7 @@ public abstract class World implements IBlockAccess {
@@ -1270,6 +1274,7 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.methodProfiler.c("regular");
@ -315,7 +315,7 @@ index 9b4cc07..b5c5e36 100644
for (i = 0; i < this.entityList.size(); ++i) {
entity = (Entity) this.entityList.get(i);
@@ -1315,7 +1320,9 @@ public abstract class World implements IBlockAccess {
@@ -1292,7 +1297,9 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.a("tick");
if (!entity.dead) {
try {
@ -325,7 +325,7 @@ index 9b4cc07..b5c5e36 100644
} catch (Throwable throwable1) {
crashreport = CrashReport.a(throwable1, "Ticking entity");
crashreportsystemdetails = crashreport.a("Entity being ticked");
@@ -1340,7 +1347,9 @@ public abstract class World implements IBlockAccess {
@@ -1317,7 +1324,9 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
}
@ -335,7 +335,7 @@ index 9b4cc07..b5c5e36 100644
this.N = true;
Iterator iterator = this.tileEntityList.iterator();
@@ -1355,8 +1364,11 @@ public abstract class World implements IBlockAccess {
@@ -1332,8 +1341,11 @@ public abstract class World implements IBlockAccess {
if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) {
try {
@ -347,7 +347,7 @@ index 9b4cc07..b5c5e36 100644
crashreport = CrashReport.a(throwable2, "Ticking tile entity");
crashreportsystemdetails = crashreport.a("Tile entity being ticked");
tileentity.a(crashreportsystemdetails);
@@ -1376,6 +1388,8 @@ public abstract class World implements IBlockAccess {
@@ -1353,6 +1365,8 @@ public abstract class World implements IBlockAccess {
}
}
@ -356,7 +356,7 @@ index 9b4cc07..b5c5e36 100644
this.N = false;
if (!this.b.isEmpty()) {
this.tileEntityList.removeAll(this.b);
@@ -1414,6 +1428,7 @@ public abstract class World implements IBlockAccess {
@@ -1391,6 +1405,7 @@ public abstract class World implements IBlockAccess {
this.a.clear();
}
@ -364,7 +364,7 @@ index 9b4cc07..b5c5e36 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1436,6 +1451,7 @@ public abstract class World implements IBlockAccess {
@@ -1413,6 +1428,7 @@ public abstract class World implements IBlockAccess {
byte b0 = 32;
if (!flag || this.e(i - b0, 0, j - b0, i + b0, 0, j + b0)) {
@ -372,7 +372,7 @@ index 9b4cc07..b5c5e36 100644
entity.U = entity.locX;
entity.V = entity.locY;
entity.W = entity.locZ;
@@ -1497,6 +1513,7 @@ public abstract class World implements IBlockAccess {
@@ -1474,6 +1490,7 @@ public abstract class World implements IBlockAccess {
entity.passenger = null;
}
}
@ -381,7 +381,7 @@ index 9b4cc07..b5c5e36 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9902506..836da20 100644
index 05b2d6d..e7ecbd6 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -169,9 +169,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
@ -566,5 +566,5 @@ index 55db3ff..df134e3 100644
long getPeriod() {
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 3d2f20e91ddbd6900e05d1f3437c17c1b4c88d4c Mon Sep 17 00:00:00 2001
From 2fb3d58ee2c8d00b90304314750d8988cdfb6a91 Mon Sep 17 00:00:00 2001
From: lishid <lishid@gmail.com>
Date: Sat, 16 Feb 2013 10:05:25 +1100
Subject: [PATCH] Add oreobfuscator for Spigot.
@ -10,11 +10,11 @@ Subject: [PATCH] Add oreobfuscator for Spigot.
.../net/minecraft/server/Packet56MapChunkBulk.java | 21 ++-
.../minecraft/server/PlayerInteractManager.java | 5 +
.../java/org/bukkit/craftbukkit/CraftServer.java | 6 +
.../java/org/bukkit/craftbukkit/CraftWorld.java | 4 +
.../java/org/bukkit/craftbukkit/CraftWorld.java | 9 ++
.../bukkit/craftbukkit/OrebfuscatorManager.java | 146 +++++++++++++++++++++
src/main/java/org/bukkit/craftbukkit/Spigot.java | 8 ++
src/main/resources/configurations/bukkit.yml | 6 +
10 files changed, 198 insertions(+), 1 deletion(-)
10 files changed, 203 insertions(+), 1 deletion(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@ -140,30 +140,35 @@ index 872c4ac..83704f0 100644
private boolean value = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0261647..38e551b 100644
index 9343d46..fbab028 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -121,6 +121,8 @@ public class CraftWorld implements World {
viewDistance = Bukkit.getServer().getViewDistance();
viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance);
@@ -118,6 +118,11 @@ public class CraftWorld implements World {
treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier);
mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier);
+ viewDistance = Bukkit.getServer().getViewDistance();
+ viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance);
+
+ obfuscated = !world.getServer().orebfuscatorDisabledWorlds.contains(name);
+
server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick);
@@ -137,6 +139,7 @@ public class CraftWorld implements World {
@@ -131,6 +136,8 @@ public class CraftWorld implements World {
server.getLogger().info("Sugar Growth Modifier: " + sugarGrowthModifier);
server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
server.getLogger().info("View distance: " + viewDistance);
+ server.getLogger().info("View distance: " + viewDistance);
+ server.getLogger().info("Oreobfuscator: " + obfuscated);
server.getLogger().info("-------------------------------------------------");
// Spigot end
}
@@ -148,6 +151,7 @@ public class CraftWorld implements World {
public int mobSpawnRange = 4;
@@ -141,6 +148,8 @@ public class CraftWorld implements World {
public int aggregateTicks = 4;
public int viewDistance;
public double itemMergeRadius = 3.5;
public double expMergeRadius = 3.5;
+ public int viewDistance;
+ public boolean obfuscated = false;
//Crop growth rates:
public int wheatGrowthModifier = 100;
@ -340,10 +345,10 @@ index db46037..ad65bca 100644
server.getLogger().severe("[Spigot] You should not disable chunk-gc, unexpected behaviour may occur!");
}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 0c92b66..78e9a66 100644
index 87f9f1c..d0e7244 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -81,3 +81,9 @@ database:
@@ -80,3 +80,9 @@ database:
driver: org.sqlite.JDBC
password: walrus
url: jdbc:sqlite:{DIR}{NAME}.db
@ -354,5 +359,5 @@ index 0c92b66..78e9a66 100644
+ disabled-worlds:
+ - world_the_end
--
1.8.2
1.8.1-rc2

View File

@ -1,93 +0,0 @@
From a4b236f3fce26060a2a4751d6fa0f113c6cc75e6 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 25 Jan 2013 18:24:54 +1100
Subject: [PATCH] Better + more flexible itemstack merging
---
src/main/java/net/minecraft/server/EntityItem.java | 13 ++++-----
src/main/java/net/minecraft/server/World.java | 31 +++-------------------
2 files changed, 11 insertions(+), 33 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index aa8d83f..bc69f5d 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -114,7 +114,8 @@ public class EntityItem extends Entity {
}
private void g() {
- Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(0.5D, 0.0D, 0.5D)).iterator();
+ double radius = world.getWorld().itemMergeRadius;
+ Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(radius, radius, radius)).iterator();
while (iterator.hasNext()) {
EntityItem entityitem = (EntityItem) iterator.next();
@@ -143,11 +144,11 @@ public class EntityItem extends Entity {
} else if (itemstack1.count + itemstack.count > itemstack1.getMaxStackSize()) {
return false;
} else {
- itemstack1.count += itemstack.count;
- entityitem.pickupDelay = Math.max(entityitem.pickupDelay, this.pickupDelay);
- entityitem.age = Math.min(entityitem.age, this.age);
- entityitem.setItemStack(itemstack1);
- this.die();
+ itemstack.count += itemstack1.count;
+ this.pickupDelay = Math.max(entityitem.pickupDelay, this.pickupDelay);
+ this.age = Math.min(entityitem.age, this.age);
+ this.setItemStack(itemstack);
+ entityitem.die();
return true;
}
} else {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b5c5e36..ba37de6 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -948,31 +948,8 @@ public abstract class World implements IBlockAccess {
event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity, spawnReason);
} else if (entity instanceof EntityItem) {
event = CraftEventFactory.callItemSpawnEvent((EntityItem) entity);
- // Spigot start
- ItemStack item = ((EntityItem) entity).getItemStack();
- org.bukkit.craftbukkit.inventory.CraftItemStack craft = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(item);
- int maxSize = item.getMaxStackSize();
- if (item.count < maxSize) {
- double radius = this.getWorld().itemMergeRadius;
- if (radius > 0) {
- List<Entity> entities = this.getEntities(entity, entity.boundingBox.grow(radius, radius, radius));
- for (Entity e : entities) {
- if (e instanceof EntityItem) {
- EntityItem loopItem = (EntityItem) e;
- ItemStack loopStack = loopItem.getItemStack();
- if (!loopItem.dead && craft.isSimilar(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(loopStack))) {
- int toAdd = Math.min(loopStack.count, maxSize - item.count);
- item.count += toAdd;
- loopStack.count -= toAdd;
- if (loopStack.count <= 0) {
- loopItem.die();
- }
- }
- }
- }
- }
- }
- } else if (entity instanceof EntityExperienceOrb) {
+ } // Spigot start
+ if (entity instanceof EntityExperienceOrb) {
EntityExperienceOrb xp = (EntityExperienceOrb) entity;
double radius = this.getWorld().expMergeRadius;
if (radius > 0) {
@@ -987,8 +964,8 @@ public abstract class World implements IBlockAccess {
}
}
}
- // Spigot end
- } else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) {
+ } // Spigot end
+ else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) {
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
event = CraftEventFactory.callProjectileLaunchEvent(entity);
}
--
1.8.2

View File

@ -1,4 +1,4 @@
From a50f07af29ceeee1bdf4375e1b1b0a9372953fa7 Mon Sep 17 00:00:00 2001
From 44b79ea940e90d3f92db99bed464beb71ad4b8a0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Jan 2013 19:31:14 -0500
Subject: [PATCH] Reduce number of LivingEntity collision checks.
@ -33,5 +33,5 @@ index 350560e..84a2926 100644
this.o(entity);
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 576baf32ba8f8bdef7637a1e1340ff2519fcfc2e Mon Sep 17 00:00:00 2001
From 1547a6035058c9d72d3556c765f0d7a40b564048 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 29 Jan 2013 13:25:53 -0500
Subject: [PATCH] Only count entities in chunks being processed for the spawn
@ -105,5 +105,5 @@ index 2d1a372..de8f065 100644
continue label110;
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 130f626d68eefe347da48013f7fc856637da2ff2 Mon Sep 17 00:00:00 2001
From ee62a92389e8101ada783301db035a87d1391e91 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Feb 2013 17:26:20 -0500
Subject: [PATCH] Only send maps in item frames upon tracking
@ -85,5 +85,5 @@ index ae9ed52..6fa425c 100644
}
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From fb878d2b3c47d315ec5f7e996a13e0f482346edd Mon Sep 17 00:00:00 2001
From ae90d896a4e067fa4bb6202f57cbd6a3587dde7e 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] Detect, remove and warn about null tile entities.
@ -8,7 +8,7 @@ Subject: [PATCH] Detect, remove and warn about null tile entities.
1 file changed, 7 insertions(+)
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ba37de6..2a5c60e 100644
index dd61607..09c3720 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1332,6 +1332,13 @@ public abstract class World implements IBlockAccess {
@ -26,5 +26,5 @@ index ba37de6..2a5c60e 100644
ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer;
if (chunkProviderServer.unloadQueue.contains(tileentity.x >> 4, tileentity.z >> 4)) {
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 037bd973e2b44ad4421765c49603b4cef7594746 Mon Sep 17 00:00:00 2001
From 5e88bcd41dfbe2141293bca5d569b62f8b54d0c9 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
@ -12,11 +12,11 @@ This change can have dramatic impact on gameplay if configured too low. Balance
.../java/net/minecraft/server/EntityArrow.java | 2 +-
src/main/java/net/minecraft/server/EntityItem.java | 5 +-
src/main/java/net/minecraft/server/World.java | 10 +-
.../java/org/bukkit/craftbukkit/CraftWorld.java | 15 +-
.../java/org/bukkit/craftbukkit/CraftWorld.java | 15 ++
src/main/java/org/bukkit/craftbukkit/Spigot.java | 219 +++++++++++++++++++++
.../java/org/bukkit/craftbukkit/SpigotTimings.java | 3 +
src/main/resources/configurations/bukkit.yml | 3 +
8 files changed, 263 insertions(+), 7 deletions(-)
8 files changed, 264 insertions(+), 6 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ccc4858..24ab35f 100644
@ -73,7 +73,7 @@ index 4b47364..647b91f 100644
public int shake = 0;
public Entity shooter;
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index bc69f5d..430dd79 100644
index 6d54e97..924b6ed 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -100,8 +100,9 @@ public class EntityItem extends Entity {
@ -89,7 +89,7 @@ index bc69f5d..430dd79 100644
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2a5c60e..9f7eea6 100644
index 09c3720..ca6d3f0 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;
@ -124,10 +124,10 @@ index 2a5c60e..9f7eea6 100644
entity.V = entity.locY;
entity.W = entity.locZ;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 38e551b..813f662 100644
index fbab028..80762c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -102,10 +102,14 @@ public class CraftWorld implements World {
@@ -102,8 +102,14 @@ public class CraftWorld implements World {
treeGrowthModifier = configuration.getInt("world-settings.default.tree-growth-modifier", treeGrowthModifier);
mushroomGrowthModifier = configuration.getInt("world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier);
@ -137,13 +137,12 @@ index 38e551b..813f662 100644
+
//override defaults with world specific, if they exist
growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick);
itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius);
- expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius);
+ itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius);
+ expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius);
randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates);
mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange);
aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks));
@@ -123,6 +127,10 @@ public class CraftWorld implements World {
@@ -123,6 +129,10 @@ public class CraftWorld implements World {
obfuscated = !world.getServer().orebfuscatorDisabledWorlds.contains(name);
@ -154,7 +153,7 @@ index 38e551b..813f662 100644
server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick);
@@ -140,6 +148,7 @@ public class CraftWorld implements World {
@@ -138,6 +148,7 @@ public class CraftWorld implements World {
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
server.getLogger().info("View distance: " + viewDistance);
server.getLogger().info("Oreobfuscator: " + obfuscated);
@ -162,7 +161,7 @@ index 38e551b..813f662 100644
server.getLogger().info("-------------------------------------------------");
// Spigot end
}
@@ -160,6 +169,10 @@ public class CraftWorld implements World {
@@ -158,6 +169,10 @@ public class CraftWorld implements World {
public int sugarGrowthModifier = 100;
public int treeGrowthModifier = 100;
public int mushroomGrowthModifier = 100;
@ -427,7 +426,7 @@ index bbb6368..d8f73ad 100644
public static final HashMap<String, CustomTimingsHandler> tileEntityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 78e9a66..e568bf6 100644
index d0e7244..a363d81 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -46,6 +46,9 @@ world-settings:
@ -441,5 +440,5 @@ index 78e9a66..e568bf6 100644
growth-chunks-per-tick: 1000
world_nether:
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From e73e29270b3d9279e479e33311e075c8d45e85b0 Mon Sep 17 00:00:00 2001
From 07c483562114abd55d400a79894fcf1f3fdff6f3 Mon Sep 17 00:00:00 2001
From: Mike Primm <mike@primmhome.com>
Date: Wed, 20 Feb 2013 23:07:53 -0500
Subject: [PATCH] Optimize getTileEntities performance
@ -9,7 +9,7 @@ Avoid traversing tile entities for every loaded chunk
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 836da20..177fa94 100644
index e7ecbd6..eb97f41 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -658,17 +658,20 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
@ -43,5 +43,5 @@ index 836da20..177fa94 100644
return arraylist;
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 97eec6581627bdf80b2a93870f9ebe70e619e46c Mon Sep 17 00:00:00 2001
From 47c6ea5eb16afa6a145012e17bf68cb1ce985eae Mon Sep 17 00:00:00 2001
From: shakytom <tom.roberts00@gmail.com>
Date: Wed, 20 Feb 2013 22:34:38 -0500
Subject: [PATCH] Improved tile entity lookup for chunk sending
@ -26,5 +26,5 @@ index 573c0f0..e6c5f91 100644
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 88936d72c341a57f45f02a9a318b796c81737303 Mon Sep 17 00:00:00 2001
From f974ecd9e312c25a0fdfe9c83b72953ece76a053 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 08:58:35 +1100
Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the
@ -711,5 +711,5 @@ index 0000000..f1690a2
+}
\ No newline at end of file
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From f73e4d9100de1627a3f0068f37ac6bfd071fe117 Mon Sep 17 00:00:00 2001
From 8d41661909479d868da7346d59f169ef0c16aff1 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
@ -283,7 +283,7 @@ index 0000000..10390b8
+ }
+}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index e568bf6..7c18391 100644
index a363d81..63ab1ad 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -31,6 +31,9 @@ settings:
@ -297,5 +297,5 @@ index e568bf6..7c18391 100644
default:
growth-chunks-per-tick: 650
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 825efa77fe7ac52d93d638df830857e12917f7ab Mon Sep 17 00:00:00 2001
From 2435b1a2c296dc58747d689d199553988900a344 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 14 Feb 2013 17:32:20 +1100
Subject: [PATCH] Netty
@ -1140,5 +1140,5 @@ index 0000000..5dc3754
+ DATA;
+}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 253c585bd6a3087f5b45442bbfd87de29d4c02ac Mon Sep 17 00:00:00 2001
From 136302a31cd399e9c8c7a50f62dfaf412f80331a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Feb 2013 20:45:20 +1100
Subject: [PATCH] Enable Improved ping sending
@ -50,7 +50,7 @@ index 79c52f6..c6513c8 100644
public void sendAll(Packet packet) {
for (int i = 0; i < this.players.size(); ++i) {
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 7c18391..aac1406 100644
index 63ab1ad..8ce7e58 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -31,6 +31,7 @@ settings:
@ -62,5 +62,5 @@ index 7c18391..aac1406 100644
restart-on-crash: false
restart-script-location: /path/to/server/start.sh
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 3637adf9a4f3398138756799a7c91b94226e435b Mon Sep 17 00:00:00 2001
From 663703f0dde6c7b1f784c3d44c75bc8de42b16db Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 26 Feb 2013 11:31:27 +1100
Subject: [PATCH] View distance.
@ -22,5 +22,5 @@ index f788a62..98d6dd2 100644
} else {
this.e = i;
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 9662ff2f057b8d52bb4446f34979c201c6ec4dc7 Mon Sep 17 00:00:00 2001
From 6e8a534840d1c3ad843f2ca0ddf957663bd8f4c6 Mon Sep 17 00:00:00 2001
From: EdGruberman <ed@rjump.com>
Date: Fri, 22 Feb 2013 09:23:51 -0700
Subject: [PATCH] Return bed location itself instead of next to bed; Fixes
@ -44,5 +44,5 @@ index 1871d3e..2e58bf0 100644
return null;
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 808e35b72cc0f8ed679f0d1cfee555091166d02f Mon Sep 17 00:00:00 2001
From bfa0208ac0b317b7de969212c8fb95f263d57a42 Mon Sep 17 00:00:00 2001
From: EdGruberman <ed@rjump.com>
Date: Tue, 12 Feb 2013 16:17:31 -0700
Subject: [PATCH] Remove dependency on CraftPlayer.getBedSpawnLocation; Fixes
@ -31,5 +31,5 @@ index c6513c8..ae7ed8f 100644
exit = exitWorld.getWorld().getSpawnLocation();
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 3c8e332b0453faec191720e8a005918d5e6d3b33 Mon Sep 17 00:00:00 2001
From 18955462c17edb36668a1d4b03a74c24c0808aa0 Mon Sep 17 00:00:00 2001
From: EdGruberman <ed@rjump.com>
Date: Thu, 21 Feb 2013 14:22:09 -0700
Subject: [PATCH] Identify outside slot independent of inventory type; Fixes
@ -22,5 +22,5 @@ index 6ffc73d..1c7934d 100644
case FURNACE:
if (slot == 2) {
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 9284fdc8f737fa0329e3d91631fead95ce9c817a Mon Sep 17 00:00:00 2001
From 81aa8718be758dcfa0493fb0d2e7f8413140bca4 Mon Sep 17 00:00:00 2001
From: Yariv Livay <yarivlivay@gmail.com>
Date: Sat, 2 Mar 2013 09:36:52 +1100
Subject: [PATCH] BUKKIT-3661, fixed missing HangingBreakEvent when
@ -35,5 +35,5 @@ index c35a88a..f88d337 100644
this.h();
}
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From b40030724510d611cabe669bbd1efab38a88086c Mon Sep 17 00:00:00 2001
From c65e952027f2d5d256bb0abebcb842df3369c491 Mon Sep 17 00:00:00 2001
From: Yariv Livay <yarivlivay@gmail.com>
Date: Mon, 25 Feb 2013 22:26:36 +0200
Subject: [PATCH] Adds BUKKIT-3667, Faux sleepers wake up normally
@ -21,5 +21,5 @@ index bd8dfa7..ba3fde9 100644
if (this.isSleeping()) {
this.o().getTracker().sendPacketToEntity(this, new Packet18ArmAnimation(this, 3));
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 7f5b46813222f868e3e90ecaaf9b54dc80bbb031 Mon Sep 17 00:00:00 2001
From 2627073ecde57cd6b469d62517b3cc1b541cea15 Mon Sep 17 00:00:00 2001
From: Yariv Livay <yarivlivay@gmail.com>
Date: Tue, 26 Feb 2013 20:14:34 +0200
Subject: [PATCH] BUKKIT-3668 Fix wrong block in BlockDispenseEvent when
@ -22,5 +22,5 @@ index 8f7e09b..ae65526 100644
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 65ffb309f825299f03ec5feabb5bf617ba1035da Mon Sep 17 00:00:00 2001
From a3406722b3156cd56a2ec999a081439d99d0a1d4 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 4 Mar 2013 18:45:52 +1100
Subject: [PATCH] PlayerItemDamageEvent
@ -53,5 +53,5 @@ index 68e481c..de7e7ac 100644
if (entityliving instanceof EntityHuman) {
((EntityHuman) entityliving).a(StatisticList.F[this.id], 1);
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From cb1cf48db7ca1586a4d0f12ab50101771a7de7c8 Mon Sep 17 00:00:00 2001
From 82f62a2e5bdd4d3bb71606ffe0a379c81b3b3abb 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] Thread safety. Adds thread safety for chunk load / unload
@ -9,7 +9,7 @@ Subject: [PATCH] Thread safety. Adds thread safety for chunk load / unload
1 file changed, 3 insertions(+)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 813f662..e3676f2 100644
index 80762c1..3bfc669 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -256,6 +256,7 @@ public class CraftWorld implements World {
@ -37,5 +37,5 @@ index 813f662..e3676f2 100644
if (generate) {
// Use the default variant of loadChunk when generate == true.
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From ccf0f903a93204950a351be3ce71d7498c8b5529 Mon Sep 17 00:00:00 2001
From ed0189f093f3fc480ac6d68cbedbfb6e568b7222 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 17 Mar 2013 19:02:50 +1100
Subject: [PATCH] Faster UUID for entities
@ -22,5 +22,5 @@ index 24ab35f..c4c2595 100644
this.world = world;
this.setPosition(0.0D, 0.0D, 0.0D);
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 38f23eb3f66ce46512cd08cb0f323d894f68d447 Mon Sep 17 00:00:00 2001
From 10e96dbc1a41b0e6c7d754283c35dd1c16acf627 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 18 Mar 2013 20:01:44 +1100
Subject: [PATCH] Prevent NPE in CraftSign
@ -35,5 +35,5 @@ index 8e8a1c5..87af049 100644
if(lines[i] != null) {
sign.lines[i] = lines[i];
--
1.8.2
1.8.1-rc2

View File

@ -1,4 +1,4 @@
From 7001de7c59dd8347f67169cc67157cac1b253e82 Mon Sep 17 00:00:00 2001
From 23ab2677948e0b0b1b65d61834539ab35c608dd7 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 21 Mar 2013 17:00:54 +1100
Subject: [PATCH] Stage DataWatcher & WatchableObject.