Made the world info possible to turn off.

This commit is contained in:
totokaka 2013-03-23 20:15:20 +11:00 committed by md_5
parent 9009752f7c
commit 148b8e111b
7 changed files with 62 additions and 56 deletions

View File

@ -1,4 +1,4 @@
From 308eaa2dbd96b59ee9bdc253390679070bfd1533 Mon Sep 17 00:00:00 2001 From 51d316b1bc0e028efaa8c209d72fb3129c3c232e Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 17:57:27 +1100 Date: Sat, 23 Mar 2013 17:57:27 +1100
Subject: [PATCH] Spigot Changes Subject: [PATCH] Spigot Changes
@ -25,11 +25,11 @@ The set of changes which provide core Spigot functionality, which would otherwis
src/main/java/net/minecraft/server/World.java | 111 +++++++++++++++++---- src/main/java/net/minecraft/server/World.java | 111 +++++++++++++++++----
.../java/net/minecraft/server/WorldServer.java | 36 ++++++- .../java/net/minecraft/server/WorldServer.java | 36 ++++++-
.../java/org/bukkit/craftbukkit/CraftServer.java | 47 +++++---- .../java/org/bukkit/craftbukkit/CraftServer.java | 47 +++++----
.../java/org/bukkit/craftbukkit/CraftWorld.java | 68 ++++++++++++- .../java/org/bukkit/craftbukkit/CraftWorld.java | 71 ++++++++++++-
src/main/java/org/bukkit/craftbukkit/Spigot.java | 20 ++++ src/main/java/org/bukkit/craftbukkit/Spigot.java | 20 ++++
.../craftbukkit/chunkio/ChunkIOProvider.java | 2 +- .../craftbukkit/chunkio/ChunkIOProvider.java | 2 +-
src/main/resources/configurations/bukkit.yml | 25 +++++ src/main/resources/configurations/bukkit.yml | 26 +++++
24 files changed, 385 insertions(+), 78 deletions(-) 24 files changed, 389 insertions(+), 78 deletions(-)
create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java
diff --git a/.gitignore b/.gitignore diff --git a/.gitignore b/.gitignore
@ -860,10 +860,10 @@ index 6b3b9fe..872c4ac 100644
player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); 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); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index adb2bba..b510748 100644 index adb2bba..150d581 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -77,7 +77,73 @@ public class CraftWorld implements World { @@ -77,7 +77,76 @@ public class CraftWorld implements World {
if (server.chunkGCPeriod > 0) { if (server.chunkGCPeriod > 0) {
chunkGCTickCount = rand.nextInt(server.chunkGCPeriod); chunkGCTickCount = rand.nextInt(server.chunkGCPeriod);
} }
@ -878,6 +878,7 @@ index adb2bba..b510748 100644
+ } + }
+ +
+ // load defaults first + // load defaults first
+ boolean info = configuration.getBoolean("world-settings.default.info", true);
+ growthPerTick = configuration.getInt("world-settings.default.growth-chunks-per-tick", growthPerTick); + growthPerTick = configuration.getInt("world-settings.default.growth-chunks-per-tick", growthPerTick);
+ randomLightingUpdates = configuration.getBoolean("world-settings.default.random-light-updates", randomLightingUpdates); + randomLightingUpdates = configuration.getBoolean("world-settings.default.random-light-updates", randomLightingUpdates);
+ mobSpawnRange = configuration.getInt("world-settings.default.mob-spawn-range", mobSpawnRange); + mobSpawnRange = configuration.getInt("world-settings.default.mob-spawn-range", mobSpawnRange);
@ -892,6 +893,7 @@ index adb2bba..b510748 100644
+ mushroomGrowthModifier = configuration.getInt("world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier); + mushroomGrowthModifier = configuration.getInt("world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier);
+ +
+ //override defaults with world specific, if they exist + //override defaults with world specific, if they exist
+ info = configuration.getBoolean("world-settings." + name + ".info", info);
+ growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick); + growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick);
+ randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates); + randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates);
+ mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange); + mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange);
@ -905,6 +907,7 @@ index adb2bba..b510748 100644
+ treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier); + treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier);
+ mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier); + mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier);
+ +
+ if (!info) return;
+ server.getLogger().info("-------------- Spigot ----------------"); + server.getLogger().info("-------------- Spigot ----------------");
+ server.getLogger().info("-------- World Settings For [" + name + "] --------"); + server.getLogger().info("-------- World Settings For [" + name + "] --------");
+ server.getLogger().info("Growth Per Chunk: " + growthPerTick); + server.getLogger().info("Growth Per Chunk: " + growthPerTick);
@ -978,10 +981,10 @@ index 48cf5ba..1d4764c 100644
} }
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 61a95e3..58501ea 100644 index 61a95e3..bc00ad4 100644
--- a/src/main/resources/configurations/bukkit.yml --- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml
@@ -25,6 +25,31 @@ settings: @@ -25,6 +25,32 @@ settings:
query-plugins: true query-plugins: true
deprecated-verbose: default deprecated-verbose: default
shutdown-message: Server closed shutdown-message: Server closed
@ -1004,6 +1007,7 @@ index 61a95e3..58501ea 100644
+ sugar-growth-modifier: 100 + sugar-growth-modifier: 100
+ tree-growth-modifier: 100 + tree-growth-modifier: 100
+ mushroom-growth-modifier: 100 + mushroom-growth-modifier: 100
+ info: true
+ world: + world:
+ growth-chunks-per-tick: 1000 + growth-chunks-per-tick: 1000
+ world_nether: + world_nether:

View File

@ -1,4 +1,4 @@
From 9cfdf2543e6a7f7d485373d50496426132fbe161 Mon Sep 17 00:00:00 2001 From daf9b804fc18297c242cde1a7401e8c26f15e414 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:46:33 +1100 Date: Sat, 23 Mar 2013 09:46:33 +1100
Subject: [PATCH] Merge tweaks and configuration Subject: [PATCH] Merge tweaks and configuration
@ -75,10 +75,10 @@ index 2f8e066..0c378e7 100644
if (event != null && (event.isCancelled() || entity.dead)) { if (event != null && (event.isCancelled() || entity.dead)) {
entity.dead = true; entity.dead = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b510748..9343d46 100644 index 150d581..a445d8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/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 { @@ -92,6 +92,8 @@ public class CraftWorld implements World {
randomLightingUpdates = configuration.getBoolean("world-settings.default.random-light-updates", randomLightingUpdates); randomLightingUpdates = configuration.getBoolean("world-settings.default.random-light-updates", randomLightingUpdates);
mobSpawnRange = configuration.getInt("world-settings.default.mob-spawn-range", mobSpawnRange); mobSpawnRange = configuration.getInt("world-settings.default.mob-spawn-range", mobSpawnRange);
aggregateTicks = Math.max(1, configuration.getInt("world-settings.default.aggregate-chunkticks", aggregateTicks)); aggregateTicks = Math.max(1, configuration.getInt("world-settings.default.aggregate-chunkticks", aggregateTicks));
@ -87,7 +87,7 @@ index b510748..9343d46 100644
wheatGrowthModifier = configuration.getInt("world-settings.default.wheat-growth-modifier", wheatGrowthModifier); wheatGrowthModifier = configuration.getInt("world-settings.default.wheat-growth-modifier", wheatGrowthModifier);
cactusGrowthModifier = configuration.getInt("world-settings.default.cactus-growth-modifier", cactusGrowthModifier); cactusGrowthModifier = configuration.getInt("world-settings.default.cactus-growth-modifier", cactusGrowthModifier);
@@ -105,6 +107,8 @@ public class CraftWorld implements World { @@ -107,6 +109,8 @@ public class CraftWorld implements World {
randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates); randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates);
mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange); mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange);
aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks)); aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks));
@ -96,7 +96,7 @@ index b510748..9343d46 100644
wheatGrowthModifier = configuration.getInt("world-settings." + name + ".wheat-growth-modifier", wheatGrowthModifier); wheatGrowthModifier = configuration.getInt("world-settings." + name + ".wheat-growth-modifier", wheatGrowthModifier);
cactusGrowthModifier = configuration.getInt("world-settings." + name + ".cactus-growth-modifier", cactusGrowthModifier); cactusGrowthModifier = configuration.getInt("world-settings." + name + ".cactus-growth-modifier", cactusGrowthModifier);
@@ -135,6 +139,8 @@ public class CraftWorld implements World { @@ -138,6 +142,8 @@ public class CraftWorld implements World {
public boolean randomLightingUpdates = false; public boolean randomLightingUpdates = false;
public int mobSpawnRange = 4; public int mobSpawnRange = 4;
public int aggregateTicks = 4; public int aggregateTicks = 4;
@ -106,7 +106,7 @@ index b510748..9343d46 100644
public int wheatGrowthModifier = 100; public int wheatGrowthModifier = 100;
public int cactusGrowthModifier = 100; public int cactusGrowthModifier = 100;
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 58501ea..87f9f1c 100644 index bc00ad4..524c0ca 100644
--- a/src/main/resources/configurations/bukkit.yml --- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml
@@ -37,6 +37,8 @@ world-settings: @@ -37,6 +37,8 @@ world-settings:

View File

@ -1,4 +1,4 @@
From c4e48c299169a97a90a6d75871c39c6998a39cb9 Mon Sep 17 00:00:00 2001 From 44708c33dfbffaf6bd135f7707780ca0bc5fdfee Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Thu, 7 Mar 2013 20:12:46 +1100 Date: Thu, 7 Mar 2013 20:12:46 +1100
Subject: [PATCH] Async Operation Catching Subject: [PATCH] Async Operation Catching
@ -73,10 +73,10 @@ index 0c378e7..4518acc 100644
if (entity instanceof EntityHuman) { if (entity instanceof EntityHuman) {
this.players.remove(entity); this.players.remove(entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9343d46..e3732a0 100644 index a445d8f..1153eea 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -232,6 +232,7 @@ public class CraftWorld implements World { @@ -235,6 +235,7 @@ public class CraftWorld implements World {
} }
public boolean unloadChunkRequest(int x, int z, boolean safe) { public boolean unloadChunkRequest(int x, int z, boolean safe) {
@ -84,7 +84,7 @@ index 9343d46..e3732a0 100644
if (safe && isChunkInUse(x, z)) { if (safe && isChunkInUse(x, z)) {
return false; return false;
} }
@@ -242,6 +243,7 @@ public class CraftWorld implements World { @@ -245,6 +246,7 @@ public class CraftWorld implements World {
} }
public boolean unloadChunk(int x, int z, boolean save, boolean safe) { public boolean unloadChunk(int x, int z, boolean save, boolean safe) {
@ -92,7 +92,7 @@ index 9343d46..e3732a0 100644
if (safe && isChunkInUse(x, z)) { if (safe && isChunkInUse(x, z)) {
return false; return false;
} }
@@ -309,6 +311,7 @@ public class CraftWorld implements World { @@ -312,6 +314,7 @@ public class CraftWorld implements World {
} }
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {

View File

@ -1,4 +1,4 @@
From 10d11c93ed159884b0fbb4a6dac6517a695d848b Mon Sep 17 00:00:00 2001 From 647c2af3d1c4528da8d3a3fcff68233cb3c47d5d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:52:41 +1100 Date: Sat, 23 Mar 2013 09:52:41 +1100
Subject: [PATCH] View Distance Subject: [PATCH] View Distance
@ -38,20 +38,20 @@ index b7dfe40..8706874 100644
this.entitiesById = new IntHashMap(); this.entitiesById = new IntHashMap();
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b569dc4..2f72654 100644 index 1153eea..a924438 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/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 { @@ -120,6 +120,9 @@ public class CraftWorld implements World {
treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier); treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier);
mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier); mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier);
+ viewDistance = Bukkit.getServer().getViewDistance(); + viewDistance = Bukkit.getServer().getViewDistance();
+ viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance); + viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance);
+ +
if (!info) return;
server.getLogger().info("-------------- Spigot ----------------"); server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------"); server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick); @@ -134,6 +137,7 @@ public class CraftWorld implements World {
@@ -131,6 +134,7 @@ public class CraftWorld implements World {
server.getLogger().info("Sugar Growth Modifier: " + sugarGrowthModifier); server.getLogger().info("Sugar Growth Modifier: " + sugarGrowthModifier);
server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier); server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier); server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
@ -59,7 +59,7 @@ index b569dc4..2f72654 100644
server.getLogger().info("-------------------------------------------------"); server.getLogger().info("-------------------------------------------------");
// Spigot end // Spigot end
} }
@@ -141,6 +145,7 @@ public class CraftWorld implements World { @@ -144,6 +148,7 @@ public class CraftWorld implements World {
public int aggregateTicks = 4; public int aggregateTicks = 4;
public double itemMergeRadius = 3.5; public double itemMergeRadius = 3.5;
public double expMergeRadius = 3.5; public double expMergeRadius = 3.5;
@ -68,10 +68,10 @@ index b569dc4..2f72654 100644
public int wheatGrowthModifier = 100; public int wheatGrowthModifier = 100;
public int cactusGrowthModifier = 100; public int cactusGrowthModifier = 100;
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 87f9f1c..35fbd06 100644 index 524c0ca..9b85e13 100644
--- a/src/main/resources/configurations/bukkit.yml --- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml
@@ -49,6 +49,7 @@ world-settings: @@ -50,6 +50,7 @@ world-settings:
world: world:
growth-chunks-per-tick: 1000 growth-chunks-per-tick: 1000
world_nether: world_nether:

View File

@ -1,4 +1,4 @@
From 401837b0e6fa648616e680c4adb8dd2f28423de8 Mon Sep 17 00:00:00 2001 From e8ef7bc28ce65332a531646edaee333ae217a2f5 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 10:58:17 +1100 Date: Sat, 23 Mar 2013 10:58:17 +1100
Subject: [PATCH] Add oreobfuscator for Spigot. Subject: [PATCH] Add oreobfuscator for Spigot.
@ -141,19 +141,19 @@ index 872c4ac..255de03 100644
private boolean value = true; private boolean value = true;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2f72654..cedaf59 100644 index a924438..0d724cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/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 { @@ -123,6 +123,8 @@ public class CraftWorld implements World {
viewDistance = Bukkit.getServer().getViewDistance(); viewDistance = Bukkit.getServer().getViewDistance();
viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance); viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance);
+ obfuscated = !world.getServer().orebfuscatorDisabledWorlds.contains(name); + obfuscated = !world.getServer().orebfuscatorDisabledWorlds.contains(name);
+ +
if (!info) return;
server.getLogger().info("-------------- Spigot ----------------"); server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------"); server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick); @@ -138,6 +140,7 @@ public class CraftWorld implements World {
@@ -135,6 +137,7 @@ public class CraftWorld implements World {
server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier); server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier); server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
server.getLogger().info("View distance: " + viewDistance); server.getLogger().info("View distance: " + viewDistance);
@ -161,7 +161,7 @@ index 2f72654..cedaf59 100644
server.getLogger().info("-------------------------------------------------"); server.getLogger().info("-------------------------------------------------");
// Spigot end // Spigot end
} }
@@ -146,6 +149,7 @@ public class CraftWorld implements World { @@ -149,6 +152,7 @@ public class CraftWorld implements World {
public double itemMergeRadius = 3.5; public double itemMergeRadius = 3.5;
public double expMergeRadius = 3.5; public double expMergeRadius = 3.5;
public int viewDistance; public int viewDistance;
@ -335,10 +335,10 @@ index 0000000..768b74c
+ } + }
+} +}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 35fbd06..f0d731f 100644 index 9b85e13..a63dc22 100644
--- a/src/main/resources/configurations/bukkit.yml --- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml
@@ -81,3 +81,10 @@ database: @@ -82,3 +82,10 @@ database:
driver: org.sqlite.JDBC driver: org.sqlite.JDBC
password: walrus password: walrus
url: jdbc:sqlite:{DIR}{NAME}.db url: jdbc:sqlite:{DIR}{NAME}.db

View File

@ -1,4 +1,4 @@
From 4861d544fcc01c69c76bdc859ac8f380d6ae3b2d Mon Sep 17 00:00:00 2001 From c5ff374f643fb217cf6ce5424ee9135edae5e0ac Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 3 Feb 2013 05:10:21 -0500 Date: Sun, 3 Feb 2013 05:10:21 -0500
Subject: [PATCH] Entity Activation Range Subject: [PATCH] Entity Activation Range
@ -124,10 +124,10 @@ index 522320a..de0b6c6 100644
entity.V = entity.locY; entity.V = entity.locY;
entity.W = entity.locZ; entity.W = entity.locZ;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 53be4e1..c8a662b 100644 index 0d724cd..cfd08bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -102,8 +102,14 @@ public class CraftWorld implements World { @@ -103,9 +103,15 @@ public class CraftWorld implements World {
treeGrowthModifier = configuration.getInt("world-settings.default.tree-growth-modifier", treeGrowthModifier); treeGrowthModifier = configuration.getInt("world-settings.default.tree-growth-modifier", treeGrowthModifier);
mushroomGrowthModifier = configuration.getInt("world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier); mushroomGrowthModifier = configuration.getInt("world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier);
@ -136,13 +136,14 @@ index 53be4e1..c8a662b 100644
+ monsterEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-monsters"); + monsterEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-monsters");
+ +
//override defaults with world specific, if they exist //override defaults with world specific, if they exist
info = configuration.getBoolean("world-settings." + name + ".info", info);
growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick); growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick);
+ itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius); + itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius);
+ expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius); + expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius);
randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates); randomLightingUpdates = configuration.getBoolean("world-settings." + name + ".random-light-updates", randomLightingUpdates);
mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange); mobSpawnRange = configuration.getInt("world-settings." + name + ".mob-spawn-range", mobSpawnRange);
aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks)); aggregateTicks = Math.max(1, configuration.getInt("world-settings." + name + ".aggregate-chunkticks", aggregateTicks));
@@ -123,6 +129,10 @@ public class CraftWorld implements World { @@ -125,6 +131,10 @@ public class CraftWorld implements World {
obfuscated = !world.getServer().orebfuscatorDisabledWorlds.contains(name); obfuscated = !world.getServer().orebfuscatorDisabledWorlds.contains(name);
@ -150,10 +151,10 @@ index 53be4e1..c8a662b 100644
+ animalEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange); + animalEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange);
+ monsterEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange); + monsterEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange);
+ +
if (!info) return;
server.getLogger().info("-------------- Spigot ----------------"); server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------"); server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick); @@ -141,6 +151,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("Mushroom Growth Modifier: " + mushroomGrowthModifier);
server.getLogger().info("View distance: " + viewDistance); server.getLogger().info("View distance: " + viewDistance);
server.getLogger().info("Oreobfuscator: " + obfuscated); server.getLogger().info("Oreobfuscator: " + obfuscated);
@ -161,7 +162,7 @@ index 53be4e1..c8a662b 100644
server.getLogger().info("-------------------------------------------------"); server.getLogger().info("-------------------------------------------------");
// Spigot end // Spigot end
} }
@@ -158,6 +169,10 @@ public class CraftWorld implements World { @@ -161,6 +172,10 @@ public class CraftWorld implements World {
public int sugarGrowthModifier = 100; public int sugarGrowthModifier = 100;
public int treeGrowthModifier = 100; public int treeGrowthModifier = 100;
public int mushroomGrowthModifier = 100; public int mushroomGrowthModifier = 100;
@ -426,7 +427,7 @@ index bbb6368..d8f73ad 100644
public static final HashMap<String, CustomTimingsHandler> tileEntityTypeTimingMap = new HashMap<String, CustomTimingsHandler>(); public static final HashMap<String, CustomTimingsHandler> tileEntityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = 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 diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index f0d731f..b741e37 100644 index a63dc22..5822e41 100644
--- a/src/main/resources/configurations/bukkit.yml --- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml
@@ -46,6 +46,9 @@ world-settings: @@ -46,6 +46,9 @@ world-settings:
@ -436,9 +437,9 @@ index f0d731f..b741e37 100644
+ entity-activation-range-animals: 32 + entity-activation-range-animals: 32
+ entity-activation-range-monsters: 32 + entity-activation-range-monsters: 32
+ entity-activation-range-misc: 16 + entity-activation-range-misc: 16
info: true
world: world:
growth-chunks-per-tick: 1000 growth-chunks-per-tick: 1000
world_nether:
-- --
1.8.1-rc2 1.8.1-rc2

View File

@ -1,4 +1,4 @@
From d9b1a947233048d39e786322ca49cef869a3014d Mon Sep 17 00:00:00 2001 From 8f6d008a011275cf5205437a6f7a02680286a6e5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 20 Feb 2013 11:58:47 -0500 Date: Wed, 20 Feb 2013 11:58:47 -0500
Subject: [PATCH] Entity Tracking Ranges Subject: [PATCH] Entity Tracking Ranges
@ -12,10 +12,10 @@ This has multiple benefits:
4) Less client lag - Not trying to render distant item frames and paintings and entities will reduce entity count on the client, which is major for shop/town worlds which may use tons of item frames. 4) Less client lag - Not trying to render distant item frames and paintings and entities will reduce entity count on the client, which is major for shop/town worlds which may use tons of item frames.
--- ---
.../java/net/minecraft/server/EntityTracker.java | 1 + .../java/net/minecraft/server/EntityTracker.java | 1 +
.../java/org/bukkit/craftbukkit/CraftWorld.java | 21 +++++++++++++++++ .../java/org/bukkit/craftbukkit/CraftWorld.java | 22 ++++++++++++++++++
src/main/java/org/bukkit/craftbukkit/Spigot.java | 26 ++++++++++++++++++++++ src/main/java/org/bukkit/craftbukkit/Spigot.java | 26 ++++++++++++++++++++++
src/main/resources/configurations/bukkit.yml | 5 +++++ src/main/resources/configurations/bukkit.yml | 5 +++++
4 files changed, 53 insertions(+) 4 files changed, 54 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index db62084..32ce51d 100644 index db62084..32ce51d 100644
@ -30,10 +30,10 @@ index db62084..32ce51d 100644
i = this.d; i = this.d;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c8a662b..d463e40 100644 index cfd08bf..1b24d07 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -106,6 +106,12 @@ public class CraftWorld implements World { @@ -107,6 +107,12 @@ public class CraftWorld implements World {
animalEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-animals"); animalEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-animals");
monsterEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-monsters"); monsterEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-monsters");
@ -44,9 +44,9 @@ index c8a662b..d463e40 100644
+ maxTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-max"); + maxTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-max");
+ +
//override defaults with world specific, if they exist //override defaults with world specific, if they exist
info = configuration.getBoolean("world-settings." + name + ".info", info);
growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick); growthPerTick = configuration.getInt("world-settings." + name + ".growth-chunks-per-tick", growthPerTick);
itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius); @@ -135,6 +141,15 @@ public class CraftWorld implements World {
@@ -133,6 +139,14 @@ public class CraftWorld implements World {
animalEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange); animalEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange);
monsterEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange); monsterEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange);
@ -58,10 +58,11 @@ index c8a662b..d463e40 100644
+ if (maxTrackingRange == 0) { + if (maxTrackingRange == 0) {
+ System.err.println("Error! Should not have 0 maxRange"); + System.err.println("Error! Should not have 0 maxRange");
+ } + }
+
if (!info) return;
server.getLogger().info("-------------- Spigot ----------------"); server.getLogger().info("-------------- Spigot ----------------");
server.getLogger().info("-------- World Settings For [" + name + "] --------"); server.getLogger().info("-------- World Settings For [" + name + "] --------");
server.getLogger().info("Growth Per Chunk: " + growthPerTick); @@ -152,6 +167,7 @@ public class CraftWorld implements World {
@@ -149,6 +163,7 @@ public class CraftWorld implements World {
server.getLogger().info("View distance: " + viewDistance); server.getLogger().info("View distance: " + viewDistance);
server.getLogger().info("Oreobfuscator: " + obfuscated); server.getLogger().info("Oreobfuscator: " + obfuscated);
server.getLogger().info("Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange); server.getLogger().info("Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange);
@ -69,7 +70,7 @@ index c8a662b..d463e40 100644
server.getLogger().info("-------------------------------------------------"); server.getLogger().info("-------------------------------------------------");
// Spigot end // Spigot end
} }
@@ -173,6 +188,12 @@ public class CraftWorld implements World { @@ -176,6 +192,12 @@ public class CraftWorld implements World {
public int miscEntityActivationRange = 16; public int miscEntityActivationRange = 16;
public int animalEntityActivationRange = 32; public int animalEntityActivationRange = 32;
public int monsterEntityActivationRange = 32; public int monsterEntityActivationRange = 32;
@ -118,7 +119,7 @@ index d445c2e..3bfd29b 100644
+ } + }
} }
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 3a875da..9cfee2d 100644 index 8fa8c7a..35056d9 100644
--- a/src/main/resources/configurations/bukkit.yml --- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml +++ b/src/main/resources/configurations/bukkit.yml
@@ -53,6 +53,11 @@ world-settings: @@ -53,6 +53,11 @@ world-settings:
@ -130,9 +131,9 @@ index 3a875da..9cfee2d 100644
+ entity-tracking-range-monsters: 48 + entity-tracking-range-monsters: 48
+ entity-tracking-range-misc: 32 + entity-tracking-range-misc: 32
+ entity-tracking-range-max: 64 + entity-tracking-range-max: 64
info: true
world: world:
growth-chunks-per-tick: 1000 growth-chunks-per-tick: 1000
world_nether:
-- --
1.8.1-rc2 1.8.1-rc2