Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
Finish refactoring configuration. The PAIN is over for now
Dieser Commit ist enthalten in:
Ursprung
c4a67b640b
Commit
45414bbf61
@ -1,4 +1,4 @@
|
||||
From 3954712a256ec0cef75ca027cea84aa91ec43f41 Mon Sep 17 00:00:00 2001
|
||||
From 0adf31b995d7637074febf78abbdda02291a63c1 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:16:05 +1000
|
||||
Subject: [PATCH] Spigot Changes
|
||||
@ -201,239 +201,42 @@ index b7e327b..0e3a6a1 100644
|
||||
} else {
|
||||
String s2 = socketaddress.toString();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3a4ddea..4d0facf 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -66,14 +66,27 @@ public abstract class World implements IBlockAccess {
|
||||
// CraftBukkit start - public, longhashset
|
||||
public boolean allowMonsters = true;
|
||||
public boolean allowAnimals = true;
|
||||
- protected LongHashSet chunkTickList = new LongHashSet();
|
||||
+ protected gnu.trove.map.hash.TLongShortHashMap chunkTickList; // Spigot
|
||||
public long ticksPerAnimalSpawns;
|
||||
public long ticksPerMonsterSpawns;
|
||||
// CraftBukkit end
|
||||
private int O;
|
||||
int[] H;
|
||||
public boolean isStatic;
|
||||
+ // Spigot start
|
||||
|
||||
+ public static long chunkToKey(int x, int z) {
|
||||
+ long k = ((((long)x) & 0xFFFF0000L) << 16) | ((((long)x) & 0x0000FFFFL) << 0);
|
||||
+ k |= ((((long)z) & 0xFFFF0000L) << 32) | ((((long)z) & 0x0000FFFFL) << 16);
|
||||
+ return k;
|
||||
+ }
|
||||
+ public static int keyToX(long k) {
|
||||
+ return (int)(((k >> 16) & 0xFFFF0000) | (k & 0x0000FFFF));
|
||||
+ }
|
||||
+ public static int keyToZ(long k) {
|
||||
+ return (int)(((k >> 32) & 0xFFFF0000L) | ((k >> 16) & 0x0000FFFF));
|
||||
+ }
|
||||
+ // Spigot end
|
||||
public BiomeBase getBiome(int i, int j) {
|
||||
if (this.isLoaded(i, 0, j)) {
|
||||
Chunk chunk = this.getChunkAtWorldCoords(i, j);
|
||||
@@ -99,6 +112,7 @@ public abstract class World implements IBlockAccess {
|
||||
int lastXAccessed = Integer.MIN_VALUE;
|
||||
int lastZAccessed = Integer.MIN_VALUE;
|
||||
final Object chunkLock = new Object();
|
||||
+ private byte chunkTickRadius;
|
||||
|
||||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
@@ -111,11 +125,18 @@ public abstract class World implements IBlockAccess {
|
||||
// Changed signature
|
||||
public World(IDataManager idatamanager, String s, WorldSettings worldsettings, WorldProvider worldprovider, MethodProfiler methodprofiler, IConsoleLogManager iconsolelogmanager, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.generator = gen;
|
||||
+ this.worldData = idatamanager.getWorldData(); // Spigot
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
||||
+ this.chunkTickRadius = (byte)((this.getServer().getViewDistance() < 7) ? this.getServer().getViewDistance() : 7); // CraftBukkit - don't tick chunks we don't load for player
|
||||
// CraftBukkit end
|
||||
|
||||
+ // Spigot start
|
||||
+ chunkTickList = new gnu.trove.map.hash.TLongShortHashMap(world.growthPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE);
|
||||
+ chunkTickList.setAutoCompactionFactor(0);
|
||||
+ // Spigot end
|
||||
+
|
||||
this.O = this.random.nextInt(12000);
|
||||
this.H = new int['\u8000'];
|
||||
this.isStatic = false;
|
||||
@@ -123,7 +144,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler = methodprofiler;
|
||||
this.worldMaps = new WorldMapCollection(idatamanager);
|
||||
this.logAgent = iconsolelogmanager;
|
||||
- this.worldData = idatamanager.getWorldData();
|
||||
+ // this.worldData = idatamanager.getWorldData(); Moved up
|
||||
if (worldprovider != null) {
|
||||
this.worldProvider = worldprovider;
|
||||
} else if (this.worldData != null && this.worldData.j() != 0) {
|
||||
@@ -1945,6 +1966,11 @@ public abstract class World implements IBlockAccess {
|
||||
this.worldData.setWeatherDuration(1);
|
||||
}
|
||||
|
||||
+ // Spigot start
|
||||
+ public int aggregateTicks = 1;
|
||||
+ protected float modifiedOdds = 100F;
|
||||
+ public float growthOdds = 100F;
|
||||
+
|
||||
protected void B() {
|
||||
// this.chunkTickList.clear(); // CraftBukkit - removed
|
||||
this.methodProfiler.a("buildList");
|
||||
@@ -1954,25 +1980,42 @@ public abstract class World implements IBlockAccess {
|
||||
int j;
|
||||
int k;
|
||||
|
||||
+ final int optimalChunks = this.getWorld().growthPerTick;
|
||||
+
|
||||
+ if (optimalChunks <= 0) return;
|
||||
+ if (players.size() == 0) return;
|
||||
+ // Keep chunks with growth inside of the optimal chunk range
|
||||
+ int chunksPerPlayer = Math.min(200, Math.max(1, (int) (((optimalChunks - players.size()) / (double) players.size()) + 0.5)));
|
||||
+ int randRange = 3 + chunksPerPlayer / 30;
|
||||
+ if (randRange > chunkTickRadius) { // Limit to normal tick radius - including view distance
|
||||
+ randRange = chunkTickRadius;
|
||||
+ }
|
||||
+ // odds of growth happening vs growth happening in vanilla
|
||||
+ final float modifiedOdds = Math.max(35, Math.min(100, ((chunksPerPlayer + 1) * 100F) / 15F));
|
||||
+ this.modifiedOdds = modifiedOdds;
|
||||
+ this.growthOdds = modifiedOdds;
|
||||
+
|
||||
for (i = 0; i < this.players.size(); ++i) {
|
||||
entityhuman = (EntityHuman) this.players.get(i);
|
||||
- j = MathHelper.floor(entityhuman.locX / 16.0D);
|
||||
- k = MathHelper.floor(entityhuman.locZ / 16.0D);
|
||||
- byte b0 = 7;
|
||||
-
|
||||
- for (int l = -b0; l <= b0; ++l) {
|
||||
- for (int i1 = -b0; i1 <= b0; ++i1) {
|
||||
- // CraftBukkit start - Don't tick chunks queued for unload
|
||||
- ChunkProviderServer chunkProviderServer = ((WorldServer) entityhuman.world).chunkProviderServer;
|
||||
- if (chunkProviderServer.unloadQueue.contains(l + j, i1 + k)) {
|
||||
- continue;
|
||||
- }
|
||||
- // CraftBukkit end
|
||||
-
|
||||
- this.chunkTickList.add(org.bukkit.craftbukkit.util.LongHash.toLong(l + j, i1 + k)); // CraftBukkit
|
||||
+ int chunkX = MathHelper.floor(entityhuman.locX / 16.0D);
|
||||
+ int chunkZ = MathHelper.floor(entityhuman.locZ / 16.0D);
|
||||
+
|
||||
+ // Always update the chunk the player is on
|
||||
+ long key = chunkToKey(chunkX, chunkZ);
|
||||
+ int existingPlayers = Math.max(0, chunkTickList.get(key)); //filter out -1's
|
||||
+ chunkTickList.put(key, (short) (existingPlayers + 1));
|
||||
+
|
||||
+ // Check and see if we update the chunks surrounding the player this tick
|
||||
+ for (int chunk = 0; chunk < chunksPerPlayer; chunk++) {
|
||||
+ int dx = (random.nextBoolean() ? 1 : -1) * random.nextInt(randRange);
|
||||
+ int dz = (random.nextBoolean() ? 1 : -1) * random.nextInt(randRange);
|
||||
+ long hash = chunkToKey(dx + chunkX, dz + chunkZ);
|
||||
+ if (!chunkTickList.contains(hash) && this.isChunkLoaded(dx + chunkX, dz + chunkZ)) {
|
||||
+ chunkTickList.put(hash, (short) -1); //no players
|
||||
}
|
||||
}
|
||||
}
|
||||
+ // Spigot End
|
||||
|
||||
this.methodProfiler.b();
|
||||
if (this.O > 0) {
|
||||
@@ -1980,7 +2023,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
this.methodProfiler.a("playerCheckLight");
|
||||
- if (!this.players.isEmpty()) {
|
||||
+ if (!this.players.isEmpty() && this.getWorld().randomLightingUpdates) { // Spigot
|
||||
i = this.random.nextInt(this.players.size());
|
||||
entityhuman = (EntityHuman) this.players.get(i);
|
||||
j = MathHelper.floor(entityhuman.locX) + this.random.nextInt(11) - 5;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 49360c1..8114910 100644
|
||||
index 6c3fcf1..4a8d3f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.minecraft.server;
|
||||
@@ -37,6 +37,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
private static final StructurePieceTreasure[] S = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)};
|
||||
private ArrayList T = new ArrayList();
|
||||
private IntHashMap entitiesById;
|
||||
+ private int aggregateTicks = 1; // Spigot
|
||||
|
||||
+import gnu.trove.iterator.TLongShortIterator;
|
||||
+
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
@@ -13,6 +15,7 @@ import java.util.TreeSet;
|
||||
import org.bukkit.WeatherType;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.craftbukkit.util.LongHash;
|
||||
+import org.bukkit.craftbukkit.util.LongObjectHashMap;
|
||||
|
||||
import org.bukkit.event.block.BlockFormEvent;
|
||||
import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
@@ -295,15 +298,30 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit start
|
||||
public final int dimension;
|
||||
@@ -295,6 +296,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
|
||||
protected void g() {
|
||||
+ // Spigot start
|
||||
+ this.aggregateTicks--;
|
||||
+ if (this.aggregateTicks != 0) return;
|
||||
+ if (--this.aggregateTicks != 0) return;
|
||||
+ aggregateTicks = this.getWorld().aggregateTicks;
|
||||
+ // Spigot end
|
||||
super.g();
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
// CraftBukkit start
|
||||
// Iterator iterator = this.chunkTickList.iterator();
|
||||
|
||||
- for (long chunkCoord : this.chunkTickList.popAll()) {
|
||||
- int chunkX = LongHash.msw(chunkCoord);
|
||||
- int chunkZ = LongHash.lsw(chunkCoord);
|
||||
+ // Spigot start
|
||||
+ for (TLongShortIterator iter = chunkTickList.iterator(); iter.hasNext();) {
|
||||
+ iter.advance();
|
||||
+ long chunkCoord = iter.key();
|
||||
+ int chunkX = World.keyToX(chunkCoord);
|
||||
+ int chunkZ = World.keyToZ(chunkCoord);
|
||||
+ // If unloaded, or in procedd of being unloaded, drop it
|
||||
+ if ((!this.isChunkLoaded(chunkX, chunkZ)) || (this.chunkProviderServer.unloadQueue.contains(chunkX, chunkZ))) {
|
||||
+ iter.remove();
|
||||
+ continue;
|
||||
+ }
|
||||
+ int players = iter.value();
|
||||
+ // Spigot end
|
||||
// ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) iterator.next();
|
||||
int k = chunkX * 16;
|
||||
int l = chunkZ * 16;
|
||||
@@ -401,7 +419,17 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
|
||||
@@ -412,7 +417,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
if (block != null && block.isTicking()) {
|
||||
++i;
|
||||
this.growthOdds = (iter.value() < 1) ? this.modifiedOdds : 100; // Spigot - grow fast if no players are in this chunk (value = player count)
|
||||
- block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random);
|
||||
+ // Spigot start
|
||||
+ if (players < 1) {
|
||||
+ // grow fast if no players are in this chunk
|
||||
+ this.growthOdds = modifiedOdds;
|
||||
+ } else {
|
||||
+ this.growthOdds = 100;
|
||||
+ }
|
||||
+ for (int c = 0; c < ((block.id == Block.SAPLING.id) ? 1 : getWorld().aggregateTicks); c++) {
|
||||
+ block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random);
|
||||
+ }
|
||||
+ // Spigot end
|
||||
+ for ( int c = 0; c < ( ( block.id == Block.SAPLING.id ) ? 1 : getWorld().aggregateTicks ); c++ ) block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6cb50b7..12c5f81 100644
|
||||
index 2956e75..6ed5212 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -145,7 +145,7 @@ public final class CraftServer implements Server {
|
||||
protected final MinecraftServer console;
|
||||
protected final DedicatedPlayerList playerList;
|
||||
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
||||
- private YamlConfiguration configuration;
|
||||
+ protected YamlConfiguration configuration; // Spigot private -> protected
|
||||
private final Yaml yaml = new Yaml(new SafeConstructor());
|
||||
private final Map<String, OfflinePlayer> offlinePlayers = new MapMaker().softValues().makeMap();
|
||||
private final AutoUpdater updater;
|
||||
@@ -166,6 +166,13 @@ public final class CraftServer implements Server {
|
||||
private final class BooleanWrapper {
|
||||
private boolean value = true;
|
||||
@ -470,15 +273,6 @@ index 6cb50b7..12c5f81 100644
|
||||
loadPlugins();
|
||||
enablePlugins(PluginLoadOrder.STARTUP);
|
||||
}
|
||||
@@ -222,7 +237,7 @@ public final class CraftServer implements Server {
|
||||
return (File) console.options.valueOf("bukkit-settings");
|
||||
}
|
||||
|
||||
- private void saveConfig() {
|
||||
+ public void saveConfig() { // Spigot private -> public
|
||||
try {
|
||||
configuration.save(getConfigFile());
|
||||
} catch (IOException ex) {
|
||||
@@ -535,6 +550,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
((DedicatedServer) console).propertyManager = config;
|
||||
@ -548,72 +342,13 @@ index 6cb50b7..12c5f81 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 c0fb528..8958643 100644
|
||||
index d28a4c8..ce7f93a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -77,7 +77,76 @@ public class CraftWorld implements World {
|
||||
if (server.chunkGCPeriod > 0) {
|
||||
chunkGCTickCount = rand.nextInt(server.chunkGCPeriod);
|
||||
}
|
||||
- }
|
||||
+ // Spigot Start
|
||||
+ org.bukkit.configuration.file.YamlConfiguration configuration = server.configuration;
|
||||
+ String name;
|
||||
+ if (world.worldData == null || world.worldData.getName() == null) {
|
||||
+ name = "default";
|
||||
+ } else {
|
||||
+ name = world.worldData.getName().replaceAll(" ", "_");
|
||||
+ }
|
||||
+
|
||||
+ // load defaults first
|
||||
+ boolean info = configuration.getBoolean("world-settings.default.info", true);
|
||||
+ growthPerTick = configuration.getInt("world-settings.default.growth-chunks-per-tick", growthPerTick);
|
||||
+ 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));
|
||||
+
|
||||
+ wheatGrowthModifier = configuration.getInt("world-settings.default.wheat-growth-modifier", wheatGrowthModifier);
|
||||
+ cactusGrowthModifier = configuration.getInt("world-settings.default.cactus-growth-modifier", cactusGrowthModifier);
|
||||
+ melonGrowthModifier = configuration.getInt("world-settings.default.melon-growth-modifier", melonGrowthModifier);
|
||||
+ pumpkinGrowthModifier = configuration.getInt("world-settings.default.pumpkin-growth-modifier", pumpkinGrowthModifier);
|
||||
+ sugarGrowthModifier = configuration.getInt("world-settings.default.sugar-growth-modifier", sugarGrowthModifier);
|
||||
+ treeGrowthModifier = configuration.getInt("world-settings.default.tree-growth-modifier", treeGrowthModifier);
|
||||
+ mushroomGrowthModifier = configuration.getInt("world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier);
|
||||
+
|
||||
+ //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);
|
||||
+ 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));
|
||||
+
|
||||
+ wheatGrowthModifier = configuration.getInt("world-settings." + name + ".wheat-growth-modifier", wheatGrowthModifier);
|
||||
+ cactusGrowthModifier = configuration.getInt("world-settings." + name + ".cactus-growth-modifier", cactusGrowthModifier);
|
||||
+ melonGrowthModifier = configuration.getInt("world-settings." + name + ".melon-growth-modifier", melonGrowthModifier);
|
||||
+ pumpkinGrowthModifier = configuration.getInt("world-settings." + name + ".pumpkin-growth-modifier", pumpkinGrowthModifier);
|
||||
+ sugarGrowthModifier = configuration.getInt("world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier);
|
||||
+ treeGrowthModifier = configuration.getInt("world-settings." + name + ".tree-growth-modifier", treeGrowthModifier);
|
||||
+ mushroomGrowthModifier = configuration.getInt("world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier);
|
||||
+
|
||||
+ if (!info) return;
|
||||
+ server.getLogger().info("-------------- Spigot ----------------");
|
||||
+ server.getLogger().info("-------- World Settings For [" + name + "] --------");
|
||||
+ server.getLogger().info("Growth Per Chunk: " + growthPerTick);
|
||||
+ server.getLogger().info("Random Lighting Updates: " + randomLightingUpdates);
|
||||
+ server.getLogger().info("Mob Spawn Range: " + mobSpawnRange);
|
||||
+ server.getLogger().info("Aggregate Ticks: " + aggregateTicks);
|
||||
+ server.getLogger().info("Wheat Growth Modifier: " + wheatGrowthModifier);
|
||||
+ server.getLogger().info("Cactus Growth Modifier: " + cactusGrowthModifier);
|
||||
+ server.getLogger().info("Melon Growth Modifier: " + melonGrowthModifier);
|
||||
+ server.getLogger().info("Pumpkin Growth Modifier: " + pumpkinGrowthModifier);
|
||||
+ server.getLogger().info("Sugar Growth Modifier: " + sugarGrowthModifier);
|
||||
+ server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
|
||||
+ server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
|
||||
+ server.getLogger().info("-------------------------------------------------");
|
||||
+ // Spigot end
|
||||
+ }
|
||||
+ // Spigot Start
|
||||
+ public int growthPerTick = 650;
|
||||
@@ -69,6 +69,17 @@ public class CraftWorld implements World {
|
||||
private static final Random rand = new Random();
|
||||
// Spigot start
|
||||
public int growthPerTick = 650;
|
||||
+ public boolean randomLightingUpdates = false;
|
||||
+ public int mobSpawnRange = 4;
|
||||
+ public int aggregateTicks = 4;
|
||||
@ -625,10 +360,56 @@ index c0fb528..8958643 100644
|
||||
+ public int sugarGrowthModifier = 100;
|
||||
+ public int treeGrowthModifier = 100;
|
||||
+ public int mushroomGrowthModifier = 100;
|
||||
+ // Spigot end
|
||||
// Spigot end
|
||||
|
||||
public Block getBlockAt(int x, int y, int z) {
|
||||
return getChunkAt(x >> 4, z >> 4).getBlock(x & 0xF, y & 0xFF, z & 0xF);
|
||||
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
|
||||
@@ -94,16 +105,46 @@ public class CraftWorld implements World {
|
||||
// Load defaults first
|
||||
boolean info = configuration.getBoolean( "world-settings.default.info", true );
|
||||
growthPerTick = configuration.getInt( "world-settings.default.growth-chunks-per-tick", growthPerTick );
|
||||
+ 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 ) );
|
||||
+ wheatGrowthModifier = configuration.getInt( "world-settings.default.wheat-growth-modifier", wheatGrowthModifier );
|
||||
+ cactusGrowthModifier = configuration.getInt( "world-settings.default.cactus-growth-modifier", cactusGrowthModifier );
|
||||
+ melonGrowthModifier = configuration.getInt( "world-settings.default.melon-growth-modifier", melonGrowthModifier );
|
||||
+ pumpkinGrowthModifier = configuration.getInt( "world-settings.default.pumpkin-growth-modifier", pumpkinGrowthModifier );
|
||||
+ sugarGrowthModifier = configuration.getInt( "world-settings.default.sugar-growth-modifier", sugarGrowthModifier );
|
||||
+ treeGrowthModifier = configuration.getInt( "world-settings.default.tree-growth-modifier", treeGrowthModifier );
|
||||
+ mushroomGrowthModifier = configuration.getInt( "world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier );
|
||||
|
||||
// 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 );
|
||||
+ 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 ) );
|
||||
+ wheatGrowthModifier = configuration.getInt( "world-settings." + name + ".wheat-growth-modifier", wheatGrowthModifier );
|
||||
+ cactusGrowthModifier = configuration.getInt( "world-settings." + name + ".cactus-growth-modifier", cactusGrowthModifier );
|
||||
+ melonGrowthModifier = configuration.getInt( "world-settings." + name + ".melon-growth-modifier", melonGrowthModifier );
|
||||
+ pumpkinGrowthModifier = configuration.getInt( "world-settings." + name + ".pumpkin-growth-modifier", pumpkinGrowthModifier );
|
||||
+ sugarGrowthModifier = configuration.getInt( "world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier );
|
||||
+ treeGrowthModifier = configuration.getInt( "world-settings." + name + ".tree-growth-modifier", treeGrowthModifier );
|
||||
+ mushroomGrowthModifier = configuration.getInt( "world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier );
|
||||
|
||||
if ( info )
|
||||
{
|
||||
server.getLogger().info( "-------------- Spigot ----------------" );
|
||||
server.getLogger().info( "-------- World Settings For [" + name + "] --------" );
|
||||
server.getLogger().info( "Growth Per Tick: " + growthPerTick );
|
||||
+ server.getLogger().info( "Random Lighting Updates: " + randomLightingUpdates );
|
||||
+ server.getLogger().info( "Mob Spawn Range: " + mobSpawnRange );
|
||||
+ server.getLogger().info( "Aggregate Ticks: " + aggregateTicks );
|
||||
+ server.getLogger().info( "Wheat Growth Modifier: " + wheatGrowthModifier );
|
||||
+ server.getLogger().info( "Cactus Growth Modifier: " + cactusGrowthModifier );
|
||||
+ server.getLogger().info( "Melon Growth Modifier: " + melonGrowthModifier );
|
||||
+ server.getLogger().info( "Pumpkin Growth Modifier: " + pumpkinGrowthModifier );
|
||||
+ server.getLogger().info( "Sugar Growth Modifier: " + sugarGrowthModifier );
|
||||
+ server.getLogger().info( "Tree Growth Modifier: " + treeGrowthModifier );
|
||||
+ server.getLogger().info( "Mushroom Growth Modifier: " + mushroomGrowthModifier );
|
||||
server.getLogger().info( "-------------------------------------------------" );
|
||||
}
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
new file mode 100644
|
||||
index 0000000..2cd806e
|
@ -1,4 +1,4 @@
|
||||
From d62facce1542c708d4fb2c5f8a81125a8c969943 Mon Sep 17 00:00:00 2001
|
||||
From 675e36fe50d76fed89733d50e4aa8dd9e77d9bae Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:09:45 +1000
|
||||
Subject: [PATCH] More Efficient Chunk Save Queue
|
@ -1,14 +1,14 @@
|
||||
From 31494624650dcc0c1cbb5b7811e155cb4a541181 Mon Sep 17 00:00:00 2001
|
||||
From 03b4e58f72365f9bdcb6b1aca9076090ee52a338 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:17:37 +1000
|
||||
Subject: [PATCH] More Efficient GetCubes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 4d0facf..44ccf51 100644
|
||||
index ddf84f8..7385c25 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1037,19 +1037,47 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1043,19 +1043,47 @@ public abstract class World implements IBlockAccess {
|
||||
int i1 = MathHelper.floor(axisalignedbb.c);
|
||||
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 163d8b5553ebbec1275d0cc48f896eb40c1e8de6 Mon Sep 17 00:00:00 2001
|
||||
From ca7ba349526b3081825ae44cda56ad4726c597be Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 23 Apr 2013 11:22:07 +1000
|
||||
Subject: [PATCH] Proxy IP Filter
|
@ -1,4 +1,4 @@
|
||||
From c0cfa283e961ba7cbe3b32a3665d20ba5d752fe4 Mon Sep 17 00:00:00 2001
|
||||
From 244ca83b5d4a8556debfd1afb5af9e49900c8407 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 09:46:33 +1100
|
||||
Subject: [PATCH] Merge tweaks and configuration
|
||||
@ -41,10 +41,10 @@ index 0225f53..294ab8f 100644
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 44ccf51..9bc0172 100644
|
||||
index 7385c25..69799d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -949,6 +949,23 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -955,6 +955,23 @@ public abstract class World implements IBlockAccess {
|
||||
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
|
||||
event = CraftEventFactory.callProjectileLaunchEvent(entity);
|
||||
}
|
||||
@ -69,36 +69,46 @@ index 44ccf51..9bc0172 100644
|
||||
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 8958643..16946da 100644
|
||||
index ce7f93a..24230de 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -92,6 +92,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));
|
||||
@@ -80,6 +80,9 @@ public class CraftWorld implements World {
|
||||
public int sugarGrowthModifier = 100;
|
||||
public int treeGrowthModifier = 100;
|
||||
public int mushroomGrowthModifier = 100;
|
||||
+ // Merge radius:
|
||||
+ public double itemMergeRadius = 3.5;
|
||||
+ public double expMergeRadius = 3.5;
|
||||
// Spigot end
|
||||
|
||||
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
|
||||
@@ -115,6 +118,8 @@ public class CraftWorld implements World {
|
||||
sugarGrowthModifier = configuration.getInt( "world-settings.default.sugar-growth-modifier", sugarGrowthModifier );
|
||||
treeGrowthModifier = configuration.getInt( "world-settings.default.tree-growth-modifier", treeGrowthModifier );
|
||||
mushroomGrowthModifier = configuration.getInt( "world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier );
|
||||
+ 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);
|
||||
@@ -107,6 +109,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));
|
||||
// Override defaults with world specific, if they exist
|
||||
info = configuration.getBoolean( "world-settings." + name + ".info", info );
|
||||
@@ -129,6 +134,8 @@ public class CraftWorld implements World {
|
||||
sugarGrowthModifier = configuration.getInt( "world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier );
|
||||
treeGrowthModifier = configuration.getInt( "world-settings." + name + ".tree-growth-modifier", treeGrowthModifier );
|
||||
mushroomGrowthModifier = configuration.getInt( "world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier );
|
||||
+ 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);
|
||||
@@ -138,6 +142,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;
|
||||
if ( info )
|
||||
{
|
||||
@@ -145,6 +152,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( "Item Merge Radius: " + itemMergeRadius );
|
||||
+ server.getLogger().info( "Exp Merge Radius: " + expMergeRadius );
|
||||
server.getLogger().info( "-------------------------------------------------" );
|
||||
}
|
||||
// Spigot end
|
||||
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
|
||||
index b445808..56873b6 100644
|
||||
--- a/src/main/resources/configurations/bukkit.yml
|
@ -1,4 +1,4 @@
|
||||
From 921555ba3dfa656399e34d653ad8a4d55f8e584e Mon Sep 17 00:00:00 2001
|
||||
From 3656d1faf6a82a57643c4e9b4a69ce221bede795 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.
|
@ -1,4 +1,4 @@
|
||||
From 00d20ac15781cb71b64d103c66c94ff83d08761d Mon Sep 17 00:00:00 2001
|
||||
From b99e7e04906d22b535abf86fd97b7e30616a1999 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 7 Mar 2013 20:12:46 +1100
|
||||
Subject: [PATCH] Async Operation Catching
|
||||
@ -46,10 +46,10 @@ index 5c03732..5f3c780 100644
|
||||
this.trackedPlayers.remove(entityplayer);
|
||||
entityplayer.removeQueue.add(Integer.valueOf(this.tracker.id));
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 9bc0172..a2d1447 100644
|
||||
index 69799d9..b05edd1 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -918,6 +918,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -924,6 +924,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
|
||||
@ -57,7 +57,7 @@ index 9bc0172..a2d1447 100644
|
||||
if (entity == null) return false;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -1024,6 +1025,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1030,6 +1031,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public void removeEntity(Entity entity) {
|
||||
@ -65,7 +65,7 @@ index 9bc0172..a2d1447 100644
|
||||
entity.die();
|
||||
if (entity instanceof EntityHuman) {
|
||||
this.players.remove(entity);
|
||||
@@ -2443,6 +2445,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -2447,6 +2449,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public void a(List list) {
|
||||
@ -74,10 +74,10 @@ index 9bc0172..a2d1447 100644
|
||||
Entity entity = null;
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 16946da..e372520 100644
|
||||
index 24230de..e9dc555 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -235,6 +235,7 @@ public class CraftWorld implements World {
|
||||
@@ -240,6 +240,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean unloadChunkRequest(int x, int z, boolean safe) {
|
||||
@ -85,7 +85,7 @@ index 16946da..e372520 100644
|
||||
if (safe && isChunkInUse(x, z)) {
|
||||
return false;
|
||||
}
|
||||
@@ -245,6 +246,7 @@ public class CraftWorld implements World {
|
||||
@@ -250,6 +251,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean unloadChunk(int x, int z, boolean save, boolean safe) {
|
||||
@ -93,7 +93,7 @@ index 16946da..e372520 100644
|
||||
if (safe && isChunkInUse(x, z)) {
|
||||
return false;
|
||||
}
|
||||
@@ -312,6 +314,7 @@ public class CraftWorld implements World {
|
||||
@@ -317,6 +319,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
public boolean loadChunk(int x, int z, boolean generate) {
|
@ -1,4 +1,4 @@
|
||||
From 339073db1468e8d6c9dc38eefb73c34246f2e350 Mon Sep 17 00:00:00 2001
|
||||
From fef2a238d3d5f93cca594086982a37978b7452be Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
||||
Subject: [PATCH] View Distance
|
||||
@ -19,10 +19,10 @@ index 0dfd190..c543bed 100644
|
||||
} else {
|
||||
this.e = i;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 8114910..3a321da 100644
|
||||
index ea6e3e6..c3ef7c7 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
|
||||
@@ -49,7 +49,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit end
|
||||
this.server = minecraftserver;
|
||||
this.tracker = new EntityTracker(this);
|
||||
@ -32,35 +32,35 @@ index 8114910..3a321da 100644
|
||||
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 e372520..0c7ff1a 100644
|
||||
index e9dc555..c1ef7ab 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -120,6 +120,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);
|
||||
@@ -83,6 +83,7 @@ public class CraftWorld implements World {
|
||||
// Merge radius:
|
||||
public double itemMergeRadius = 3.5;
|
||||
public double expMergeRadius = 3.5;
|
||||
+ public int viewDistance;
|
||||
// Spigot end
|
||||
|
||||
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
|
||||
@@ -137,6 +138,9 @@ public class CraftWorld implements World {
|
||||
itemMergeRadius = configuration.getDouble("world-settings." + name + ".item-merge-radius", itemMergeRadius);
|
||||
expMergeRadius = configuration.getDouble("world-settings." + name + ".exp-merge-radius", expMergeRadius);
|
||||
|
||||
+ viewDistance = Bukkit.getServer().getViewDistance();
|
||||
+ viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance );
|
||||
+
|
||||
if (!info) return;
|
||||
if ( info )
|
||||
{
|
||||
server.getLogger().info( "-------------- Spigot ----------------" );
|
||||
server.getLogger().info("-------- World Settings For [" + name + "] --------");
|
||||
@@ -134,6 +137,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info("Sugar Growth Modifier: " + sugarGrowthModifier);
|
||||
server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
|
||||
@@ -154,6 +158,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info( "Mushroom Growth Modifier: " + mushroomGrowthModifier );
|
||||
server.getLogger().info( "Item Merge Radius: " + itemMergeRadius );
|
||||
server.getLogger().info( "Exp Merge Radius: " + expMergeRadius );
|
||||
+ server.getLogger().info( "View distance: " + viewDistance );
|
||||
server.getLogger().info( "-------------------------------------------------" );
|
||||
// Spigot end
|
||||
}
|
||||
@@ -144,6 +148,7 @@ public class CraftWorld implements World {
|
||||
public int aggregateTicks = 4;
|
||||
public double itemMergeRadius = 3.5;
|
||||
public double expMergeRadius = 3.5;
|
||||
+ public int viewDistance;
|
||||
//Crop growth rates:
|
||||
public int wheatGrowthModifier = 100;
|
||||
public int cactusGrowthModifier = 100;
|
||||
// Spigot end
|
||||
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
|
||||
index 56873b6..fe257e2 100644
|
||||
--- a/src/main/resources/configurations/bukkit.yml
|
@ -1,4 +1,4 @@
|
||||
From b2f5102e5229c2b7e85d57e03a7c34de2bfdf5c4 Mon Sep 17 00:00:00 2001
|
||||
From 19e16bd95f62827f53bfac9f9224c1ac7002b2a2 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Sun, 13 Jan 2013 03:49:07 -0800
|
||||
Subject: [PATCH] Implement 'lightening' of NibbleArrays - only allocate
|
@ -1,4 +1,4 @@
|
||||
From cc9e51ce6dbecfac953d8262ec8427a961357059 Mon Sep 17 00:00:00 2001
|
||||
From 7d114a50a29a22e3a987c01d3aadbc560088223b 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
|
@ -1,14 +1,14 @@
|
||||
From c5f8d8c747887ce77e775f45c3941d10d05c8147 Mon Sep 17 00:00:00 2001
|
||||
From 43102c1d9df4854ee9376b89e9e03cce4449e021 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
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a2d1447..3038f80 100644
|
||||
index b05edd1..612ca7d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -293,15 +293,13 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -299,15 +299,13 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
public Chunk getChunkAt(int i, int j) {
|
@ -1,4 +1,4 @@
|
||||
From 5080d5e708eb3f59614dc2e48239eac19f1dff51 Mon Sep 17 00:00:00 2001
|
||||
From 4afbcdda0416f8390ee171d54a61d56afa061847 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.
|
@ -1,4 +1,4 @@
|
||||
From 07c9c447262df050e0c5b2efc9b12fe6923a2ab7 Mon Sep 17 00:00:00 2001
|
||||
From fb2c5da62003070d1fc9104ee567822c00e7bf30 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
|
||||
@ -266,7 +266,7 @@ index db3fc42..ffa9bb6 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 3038f80..130d948 100644
|
||||
index 612ca7d..37fc4f5 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;
|
||||
@ -277,16 +277,16 @@ index 3038f80..130d948 100644
|
||||
import org.bukkit.craftbukkit.util.UnsafeList;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
@@ -114,6 +115,8 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -122,6 +123,8 @@ public abstract class World implements IBlockAccess {
|
||||
int lastZAccessed = Integer.MIN_VALUE;
|
||||
final Object chunkLock = new Object();
|
||||
private byte chunkTickRadius;
|
||||
|
||||
+ public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||
+
|
||||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
}
|
||||
@@ -193,6 +196,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -199,6 +202,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.a();
|
||||
|
||||
this.getServer().addWorld(this.world); // CraftBukkit
|
||||
@ -294,7 +294,7 @@ index 3038f80..130d948 100644
|
||||
}
|
||||
|
||||
protected abstract IChunkProvider j();
|
||||
@@ -1265,6 +1269,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1271,6 +1275,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.f.clear();
|
||||
this.methodProfiler.c("regular");
|
||||
|
||||
@ -302,7 +302,7 @@ index 3038f80..130d948 100644
|
||||
for (i = 0; i < this.entityList.size(); ++i) {
|
||||
entity = (Entity) this.entityList.get(i);
|
||||
|
||||
@@ -1287,7 +1292,9 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1293,7 +1298,9 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.a("tick");
|
||||
if (!entity.dead) {
|
||||
try {
|
||||
@ -312,7 +312,7 @@ index 3038f80..130d948 100644
|
||||
} catch (Throwable throwable1) {
|
||||
crashreport = CrashReport.a(throwable1, "Ticking entity");
|
||||
crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||
@@ -1312,7 +1319,9 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1318,7 +1325,9 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ index 3038f80..130d948 100644
|
||||
this.N = true;
|
||||
Iterator iterator = this.tileEntityList.iterator();
|
||||
|
||||
@@ -1327,8 +1336,11 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1333,8 +1342,11 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) {
|
||||
try {
|
||||
@ -334,7 +334,7 @@ index 3038f80..130d948 100644
|
||||
crashreport = CrashReport.a(throwable2, "Ticking tile entity");
|
||||
crashreportsystemdetails = crashreport.a("Tile entity being ticked");
|
||||
tileentity.a(crashreportsystemdetails);
|
||||
@@ -1348,6 +1360,8 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1354,6 +1366,8 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@ index 3038f80..130d948 100644
|
||||
this.N = false;
|
||||
if (!this.b.isEmpty()) {
|
||||
this.tileEntityList.removeAll(this.b);
|
||||
@@ -1386,6 +1400,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1392,6 +1406,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.a.clear();
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ index 3038f80..130d948 100644
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
@@ -1408,6 +1423,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1414,6 +1429,7 @@ public abstract class World implements IBlockAccess {
|
||||
byte b0 = 32;
|
||||
|
||||
if (!flag || this.e(i - b0, 0, j - b0, i + b0, 0, j + b0)) {
|
||||
@ -359,7 +359,7 @@ index 3038f80..130d948 100644
|
||||
entity.U = entity.locX;
|
||||
entity.V = entity.locY;
|
||||
entity.W = entity.locZ;
|
||||
@@ -1469,6 +1485,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1475,6 +1491,7 @@ public abstract class World implements IBlockAccess {
|
||||
entity.passenger = null;
|
||||
}
|
||||
}
|
||||
@ -368,10 +368,10 @@ index 3038f80..130d948 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 3a321da..5bbf775 100644
|
||||
index c3ef7c7..3f31ff1 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -186,9 +186,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -184,9 +184,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
||||
long time = this.worldData.getTime();
|
||||
if (this.getGameRules().getBoolean("doMobSpawning") && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) {
|
||||
@ -384,7 +384,7 @@ index 3a321da..5bbf775 100644
|
||||
this.methodProfiler.c("chunkSource");
|
||||
this.chunkProvider.unloadChunks();
|
||||
int j = this.a(1.0F);
|
||||
@@ -199,21 +202,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -197,21 +200,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
|
||||
this.worldData.setTime(this.worldData.getTime() + 1L);
|
||||
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
@ -1,4 +1,4 @@
|
||||
From dfdd8f8a4b40910948d7ea205bf1be8027e750c5 Mon Sep 17 00:00:00 2001
|
||||
From c5c93da98f2055551632763b1047a312a47424fa Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 16 May 2013 18:51:05 +1000
|
||||
Subject: [PATCH] Orebfuscator
|
||||
@ -107,7 +107,7 @@ index 1243d1d..e45bcd2 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 12c5f81..010e9c3 100644
|
||||
index 6ed5212..ff929e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -163,6 +163,12 @@ public final class CraftServer implements Server {
|
||||
@ -124,34 +124,33 @@ index 12c5f81..010e9c3 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 0c7ff1a..0a2d8b1 100644
|
||||
index c1ef7ab..e8cd8bf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -123,6 +123,8 @@ public class CraftWorld implements World {
|
||||
viewDistance = Bukkit.getServer().getViewDistance();
|
||||
viewDistance = configuration.getInt("world-settings." + name + ".view-distance", viewDistance);
|
||||
|
||||
+ obfuscated = world.getServer().orebfuscatorEnabled && !world.getServer().orebfuscatorDisabledWorlds.contains(name);
|
||||
+
|
||||
if (!info) return;
|
||||
server.getLogger().info("-------------- Spigot ----------------");
|
||||
server.getLogger().info("-------- World Settings For [" + name + "] --------");
|
||||
@@ -138,6 +140,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info("Tree Growth Modifier: " + treeGrowthModifier);
|
||||
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
|
||||
server.getLogger().info("View distance: " + viewDistance);
|
||||
+ server.getLogger().info("Oreobfuscator: " + obfuscated);
|
||||
server.getLogger().info("-------------------------------------------------");
|
||||
// Spigot end
|
||||
}
|
||||
@@ -149,6 +152,7 @@ public class CraftWorld implements World {
|
||||
@@ -84,6 +84,7 @@ public class CraftWorld implements World {
|
||||
public double itemMergeRadius = 3.5;
|
||||
public double expMergeRadius = 3.5;
|
||||
public int viewDistance;
|
||||
+ public boolean obfuscated = false;
|
||||
//Crop growth rates:
|
||||
public int wheatGrowthModifier = 100;
|
||||
public int cactusGrowthModifier = 100;
|
||||
// Spigot end
|
||||
|
||||
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
|
||||
@@ -140,6 +141,7 @@ public class CraftWorld implements World {
|
||||
|
||||
viewDistance = Bukkit.getServer().getViewDistance();
|
||||
viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance );
|
||||
+ obfuscated = world.getServer().orebfuscatorEnabled && !world.getServer().orebfuscatorDisabledWorlds.contains( name );
|
||||
|
||||
if ( info )
|
||||
{
|
||||
@@ -159,6 +161,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info( "Item Merge Radius: " + itemMergeRadius );
|
||||
server.getLogger().info( "Exp Merge Radius: " + expMergeRadius );
|
||||
server.getLogger().info( "View distance: " + viewDistance );
|
||||
+ server.getLogger().info( "Orebfuscator: " + obfuscated );
|
||||
server.getLogger().info( "-------------------------------------------------" );
|
||||
}
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index 67477f4..e5004b3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
@ -1,4 +1,4 @@
|
||||
From cad2de0e8b815c5bc61c633aee5122932bb4d8c7 Mon Sep 17 00:00:00 2001
|
||||
From bfd30316baed3c25efcc30bc6a5ba2684e52da26 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
|
@ -1,14 +1,14 @@
|
||||
From f736edc2aec1807e16d2cedb7cbcdd9fded97dfe Mon Sep 17 00:00:00 2001
|
||||
From d019622c4df444ea63166b76873f0c2d7842e533 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.
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 130d948..5eab968 100644
|
||||
index 37fc4f5..c91b9df 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1327,6 +1327,13 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1333,6 +1333,13 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
TileEntity tileentity = (TileEntity) iterator.next();
|
@ -1,4 +1,4 @@
|
||||
From d257c428c507b6c2904cedec0a70e8876aeda20b Mon Sep 17 00:00:00 2001
|
||||
From 2a3ea7b58eb897de61764939ca9093abc337fb1c 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
|
||||
@ -118,7 +118,7 @@ index 58a4acb..35f3fea 100644
|
||||
public EntityLiving(World world) {
|
||||
super(world);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 5eab968..fa7ca31 100644
|
||||
index c91b9df..1120ffd 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;
|
||||
@ -129,7 +129,7 @@ index 5eab968..fa7ca31 100644
|
||||
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
import org.bukkit.craftbukkit.util.UnsafeList;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
@@ -1269,6 +1270,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1275,6 +1276,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.f.clear();
|
||||
this.methodProfiler.c("regular");
|
||||
|
||||
@ -137,7 +137,7 @@ index 5eab968..fa7ca31 100644
|
||||
timings.entityTick.startTiming(); // Spigot
|
||||
for (i = 0; i < this.entityList.size(); ++i) {
|
||||
entity = (Entity) this.entityList.get(i);
|
||||
@@ -1429,8 +1431,13 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1435,8 +1437,13 @@ public abstract class World implements IBlockAccess {
|
||||
int j = MathHelper.floor(entity.locZ);
|
||||
byte b0 = 32;
|
||||
|
||||
@ -154,55 +154,56 @@ index 5eab968..fa7ca31 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 0a2d8b1..8d916ae 100644
|
||||
index e8cd8bf..2f9d859 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -103,9 +103,15 @@ 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);
|
||||
|
||||
+ miscEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-misc");
|
||||
+ animalEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-animals");
|
||||
+ monsterEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-monsters");
|
||||
+
|
||||
//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);
|
||||
+ 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));
|
||||
@@ -125,6 +131,10 @@ public class CraftWorld implements World {
|
||||
|
||||
obfuscated = world.getServer().orebfuscatorEnabled && !world.getServer().orebfuscatorDisabledWorlds.contains(name);
|
||||
|
||||
+ miscEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-misc", miscEntityActivationRange);
|
||||
+ animalEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange);
|
||||
+ monsterEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange);
|
||||
+
|
||||
if (!info) return;
|
||||
server.getLogger().info("-------------- Spigot ----------------");
|
||||
server.getLogger().info("-------- World Settings For [" + name + "] --------");
|
||||
@@ -141,6 +151,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info("Mushroom Growth Modifier: " + mushroomGrowthModifier);
|
||||
server.getLogger().info("View distance: " + viewDistance);
|
||||
server.getLogger().info("Oreobfuscator: " + obfuscated);
|
||||
+ server.getLogger().info("Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange);
|
||||
server.getLogger().info("-------------------------------------------------");
|
||||
// Spigot end
|
||||
}
|
||||
@@ -161,6 +172,10 @@ public class CraftWorld implements World {
|
||||
public int sugarGrowthModifier = 100;
|
||||
public int treeGrowthModifier = 100;
|
||||
public int mushroomGrowthModifier = 100;
|
||||
+
|
||||
@@ -85,6 +85,10 @@ public class CraftWorld implements World {
|
||||
public double expMergeRadius = 3.5;
|
||||
public int viewDistance;
|
||||
public boolean obfuscated = false;
|
||||
+ // Activation ranges:
|
||||
+ public int miscEntityActivationRange = 16;
|
||||
+ public int animalEntityActivationRange = 32;
|
||||
+ public int monsterEntityActivationRange = 32;
|
||||
// Spigot end
|
||||
|
||||
public Block getBlockAt(int x, int y, int z) {
|
||||
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
|
||||
@@ -120,8 +124,11 @@ public class CraftWorld implements World {
|
||||
sugarGrowthModifier = configuration.getInt( "world-settings.default.sugar-growth-modifier", sugarGrowthModifier );
|
||||
treeGrowthModifier = configuration.getInt( "world-settings.default.tree-growth-modifier", treeGrowthModifier );
|
||||
mushroomGrowthModifier = configuration.getInt( "world-settings.default.mushroom-growth-modifier", mushroomGrowthModifier );
|
||||
- itemMergeRadius = configuration.getDouble("world-settings.default.item-merge-radius", itemMergeRadius);
|
||||
- expMergeRadius = configuration.getDouble("world-settings.default.exp-merge-radius", expMergeRadius);
|
||||
+ itemMergeRadius = configuration.getDouble( "world-settings.default.item-merge-radius", itemMergeRadius );
|
||||
+ expMergeRadius = configuration.getDouble( "world-settings.default.exp-merge-radius", expMergeRadius );
|
||||
+ miscEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-misc" );
|
||||
+ animalEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-animals" );
|
||||
+ monsterEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-monsters" );
|
||||
|
||||
// Override defaults with world specific, if they exist
|
||||
info = configuration.getBoolean( "world-settings." + name + ".info", info );
|
||||
@@ -136,8 +143,11 @@ public class CraftWorld implements World {
|
||||
sugarGrowthModifier = configuration.getInt( "world-settings." + name + ".sugar-growth-modifier", sugarGrowthModifier );
|
||||
treeGrowthModifier = configuration.getInt( "world-settings." + name + ".tree-growth-modifier", treeGrowthModifier );
|
||||
mushroomGrowthModifier = configuration.getInt( "world-settings." + name + ".mushroom-growth-modifier", mushroomGrowthModifier );
|
||||
- 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 );
|
||||
+ miscEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-misc", miscEntityActivationRange );
|
||||
+ animalEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange );
|
||||
+ monsterEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange );
|
||||
|
||||
viewDistance = Bukkit.getServer().getViewDistance();
|
||||
viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance );
|
||||
@@ -162,6 +172,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info( "Exp Merge Radius: " + expMergeRadius );
|
||||
server.getLogger().info( "View distance: " + viewDistance );
|
||||
server.getLogger().info( "Orebfuscator: " + obfuscated );
|
||||
+ server.getLogger().info( "Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange );
|
||||
server.getLogger().info( "-------------------------------------------------" );
|
||||
}
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index e5004b3..2fc33f8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
@ -1,4 +1,4 @@
|
||||
From 67ecf477dd455779e5e63f6338c558f9c1deae2d Mon Sep 17 00:00:00 2001
|
||||
From ef478d49ad459f76e82fbc30f683ebc924a2a11c 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
|
@ -1,4 +1,4 @@
|
||||
From 047eb8fcd54deba4c619979f82c098dae103470d Mon Sep 17 00:00:00 2001
|
||||
From 5b215020bda1b6de0497b9ed139d1e774587a1dd 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.
|
@ -1,4 +1,4 @@
|
||||
From 46bb18fdcf490107ac00e7f685c9aaf29853ff66 Mon Sep 17 00:00:00 2001
|
||||
From f6bd2fb90b9b614f53681fd4145bbb81b2af7884 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 23 Apr 2013 11:47:32 +1000
|
||||
Subject: [PATCH] Netty
|
||||
@ -210,7 +210,7 @@ index 17cfacc..a945892 100644
|
||||
this.b = true;
|
||||
} catch (Exception exception) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 010e9c3..fc9170f 100644
|
||||
index ff929e4..39311d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1374,4 +1374,20 @@ public final class CraftServer implements Server {
|
@ -1,4 +1,4 @@
|
||||
From bac8e9a1cb074e3b1372ff7fa43208d0e26404c9 Mon Sep 17 00:00:00 2001
|
||||
From d5d4ae169ab0abe8a417e22ff503b1387da15dc4 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
|
@ -1,4 +1,4 @@
|
||||
From cbd22e660152b5f0bef15eebab9af459fce72f3c Mon Sep 17 00:00:00 2001
|
||||
From 1a6442a6e1941f2732cef4e0d6aa7c2c6e4aaa64 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
|
@ -1,4 +1,4 @@
|
||||
From 8d6d4b3444928cae07ae970896ea8afb3226a96e Mon Sep 17 00:00:00 2001
|
||||
From dff970f3daf91957789d01ea782b3c078dea1308 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
|
@ -1,4 +1,4 @@
|
||||
From 4482fdec4e94253ea6af824e17ed396b8735fc31 Mon Sep 17 00:00:00 2001
|
||||
From ce2626f573493ce42c0d34afcf7326f9fdf7e6ab 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
|
@ -1,4 +1,4 @@
|
||||
From 9decd372b4a65a178787e658b3b5e268ec83177c Mon Sep 17 00:00:00 2001
|
||||
From 3722c158c52440feeb6342113e0131882284d8d2 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
|
@ -1,4 +1,4 @@
|
||||
From 565c13d6f1ac6fc03d34e39163f6fe8f21d158e0 Mon Sep 17 00:00:00 2001
|
||||
From 305ee8ef5336221e1a6948bbb5a1b28d53b781d8 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
|
@ -1,4 +1,4 @@
|
||||
From 5e8a1f05cf269f26c87bb288054362e9b0abdfc5 Mon Sep 17 00:00:00 2001
|
||||
From c3747166c6d51517f07c9b4945ca90521ed79129 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
|
@ -1,4 +1,4 @@
|
||||
From b0934ffb7b6ee6497732222977ed9e7eaa123ef0 Mon Sep 17 00:00:00 2001
|
||||
From e67b7218fe1029438873286490ca2514d8a9df16 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.
|
@ -1,4 +1,4 @@
|
||||
From a4ade6750e45f2f265bba77bca5655ce82c88379 Mon Sep 17 00:00:00 2001
|
||||
From ee6dd85e5385c495000a2949901a95e750ddd136 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 20 Feb 2013 11:58:47 -0500
|
||||
Subject: [PATCH] Entity Tracking Ranges
|
||||
@ -24,51 +24,14 @@ index d7efe3e..f6f1ab0 100644
|
||||
i = this.d;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 8d916ae..f07982d 100644
|
||||
index 2f9d859..6218f16 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -107,6 +107,12 @@ public class CraftWorld implements World {
|
||||
animalEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-animals");
|
||||
monsterEntityActivationRange = configuration.getInt("world-settings.default.entity-activation-range-monsters");
|
||||
|
||||
+ playerTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-players");
|
||||
+ miscTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-misc");
|
||||
+ animalTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-animals");
|
||||
+ monsterTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-monsters");
|
||||
+ maxTrackingRange = configuration.getInt("world-settings.default.entity-tracking-range-max");
|
||||
+
|
||||
//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);
|
||||
@@ -135,6 +141,15 @@ public class CraftWorld implements World {
|
||||
animalEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange);
|
||||
monsterEntityActivationRange = configuration.getInt("world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange);
|
||||
|
||||
+ maxTrackingRange = configuration.getInt("world-settings." + name + ".entity-tracking-range-max", maxTrackingRange);
|
||||
+ playerTrackingRange = Math.min(maxTrackingRange, configuration.getInt("world-settings." + name + ".entity-tracking-range-players", playerTrackingRange));
|
||||
+ miscTrackingRange = Math.min(maxTrackingRange, configuration.getInt("world-settings." + name + ".entity-tracking-range-misc", miscTrackingRange));
|
||||
+ animalTrackingRange = Math.min(maxTrackingRange, configuration.getInt("world-settings." + name + ".entity-tracking-range-animals", animalTrackingRange));
|
||||
+ monsterTrackingRange = Math.min(maxTrackingRange, configuration.getInt("world-settings." + name + ".entity-tracking-range-monsters", monsterTrackingRange));
|
||||
+ if (maxTrackingRange == 0) {
|
||||
+ System.err.println("Error! Should not have 0 maxRange");
|
||||
+ }
|
||||
+
|
||||
if (!info) return;
|
||||
server.getLogger().info("-------------- Spigot ----------------");
|
||||
server.getLogger().info("-------- World Settings For [" + name + "] --------");
|
||||
@@ -152,6 +167,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info("View distance: " + viewDistance);
|
||||
server.getLogger().info("Oreobfuscator: " + obfuscated);
|
||||
server.getLogger().info("Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange);
|
||||
+ server.getLogger().info("Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Max " + maxTrackingRange);
|
||||
server.getLogger().info("-------------------------------------------------");
|
||||
// Spigot end
|
||||
}
|
||||
@@ -176,6 +192,12 @@ public class CraftWorld implements World {
|
||||
@@ -89,6 +89,12 @@ public class CraftWorld implements World {
|
||||
public int miscEntityActivationRange = 16;
|
||||
public int animalEntityActivationRange = 32;
|
||||
public int monsterEntityActivationRange = 32;
|
||||
+
|
||||
+ // Tracking Ranges:
|
||||
+ public int playerTrackingRange = 64;
|
||||
+ public int miscTrackingRange = 32;
|
||||
+ public int animalTrackingRange = 48;
|
||||
@ -76,7 +39,47 @@ index 8d916ae..f07982d 100644
|
||||
+ public int maxTrackingRange = 64;
|
||||
// Spigot end
|
||||
|
||||
public Block getBlockAt(int x, int y, int z) {
|
||||
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
|
||||
@@ -129,6 +135,11 @@ public class CraftWorld implements World {
|
||||
miscEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-misc" );
|
||||
animalEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-animals" );
|
||||
monsterEntityActivationRange = configuration.getInt( "world-settings.default.entity-activation-range-monsters" );
|
||||
+ playerTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-players" );
|
||||
+ miscTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-misc" );
|
||||
+ animalTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-animals" );
|
||||
+ monsterTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-monsters" );
|
||||
+ maxTrackingRange = configuration.getInt( "world-settings.default.entity-tracking-range-max" );
|
||||
|
||||
// Override defaults with world specific, if they exist
|
||||
info = configuration.getBoolean( "world-settings." + name + ".info", info );
|
||||
@@ -148,10 +159,19 @@ public class CraftWorld implements World {
|
||||
miscEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-misc", miscEntityActivationRange );
|
||||
animalEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-animals", animalEntityActivationRange );
|
||||
monsterEntityActivationRange = configuration.getInt( "world-settings." + name + ".entity-activation-range-monsters", monsterEntityActivationRange );
|
||||
+ maxTrackingRange = configuration.getInt( "world-settings." + name + ".entity-tracking-range-max", maxTrackingRange );
|
||||
+ playerTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-players", playerTrackingRange ) );
|
||||
+ miscTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-misc", miscTrackingRange ) );
|
||||
+ animalTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-animals", animalTrackingRange ) );
|
||||
+ monsterTrackingRange = Math.min( maxTrackingRange, configuration.getInt( "world-settings." + name + ".entity-tracking-range-monsters", monsterTrackingRange ) );
|
||||
|
||||
viewDistance = Bukkit.getServer().getViewDistance();
|
||||
viewDistance = configuration.getInt( "world-settings." + name + ".view-distance", viewDistance );
|
||||
obfuscated = world.getServer().orebfuscatorEnabled && !world.getServer().orebfuscatorDisabledWorlds.contains( name );
|
||||
+ if ( maxTrackingRange == 0 )
|
||||
+ {
|
||||
+ System.err.println( "Error! Should not have 0 maxRange" );
|
||||
+ }
|
||||
|
||||
if ( info )
|
||||
{
|
||||
@@ -173,6 +193,7 @@ public class CraftWorld implements World {
|
||||
server.getLogger().info( "View distance: " + viewDistance );
|
||||
server.getLogger().info( "Orebfuscator: " + obfuscated );
|
||||
server.getLogger().info( "Entity Activation Range: An " + animalEntityActivationRange + " / Mo " + monsterEntityActivationRange + " / Mi " + miscEntityActivationRange );
|
||||
+ server.getLogger().info( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Max " + maxTrackingRange );
|
||||
server.getLogger().info( "-------------------------------------------------" );
|
||||
}
|
||||
// Spigot end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index 6a164ca..c434f14 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
@ -1,4 +1,4 @@
|
||||
From 1904d309995de486bde6ba0da4b8a2567c259aa3 Mon Sep 17 00:00:00 2001
|
||||
From ca371364635e418b297745fdfb1a9e5a1f3f1149 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 11:15:11 +1100
|
||||
Subject: [PATCH] BungeeCord Support
|
@ -1,4 +1,4 @@
|
||||
From 95da26c65f852e9f3996915e09bd3617787fcf13 Mon Sep 17 00:00:00 2001
|
||||
From 29e1876216e161284bde8964a33d2064410b0889 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 13:04:45 +1100
|
||||
Subject: [PATCH] Texture Pack Resolutions
|
@ -1,4 +1,4 @@
|
||||
From 6410dc7972211a5c3dba85c2a1c22bf6ef69ce34 Mon Sep 17 00:00:00 2001
|
||||
From 5f542438e7d8dcd2ea42a9793feec7d4eaffd0ae Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 19:08:41 +1100
|
||||
Subject: [PATCH] Limit Custom Map Rendering
|
@ -1,4 +1,4 @@
|
||||
From 64a983b96d9fe0e778c9bf6fec6bad1e3fca07ee Mon Sep 17 00:00:00 2001
|
||||
From 0ea93eb08852641102d51a1a8ae4b84a9b1022dd Mon Sep 17 00:00:00 2001
|
||||
From: Hudson <hudson@mydomain.com>
|
||||
Date: Wed, 3 Apr 2013 02:16:56 -0500
|
||||
Subject: [PATCH] Revert "Throw exception for disabled plugin tasks. Fixes
|
@ -1,4 +1,4 @@
|
||||
From 003586da7abd77f3d78c9f93490740e7badf70d9 Mon Sep 17 00:00:00 2001
|
||||
From 7abc0d7cdeac2369d52acd424df41766b13297be 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
|
@ -1,4 +1,4 @@
|
||||
From c1eeeb08e3a00a2a2c53684ebfdcf9f87d6eb72a Mon Sep 17 00:00:00 2001
|
||||
From b2d589c87acbdf25ea1d3c0e12e8b9c2cba981d5 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin James Harrison-Sims <tehrainbowguy@gmail.com>
|
||||
Date: Sun, 14 Apr 2013 21:19:57 +0500
|
||||
Subject: [PATCH] Prevent handshake spam from invalid names.
|
@ -1,4 +1,4 @@
|
||||
From 2f6da6dc58168d000771c0d960755451cc2dea81 Mon Sep 17 00:00:00 2001
|
||||
From d7c2bcb5484e97e70b62416fb4d3c47d574bf3af Mon Sep 17 00:00:00 2001
|
||||
From: Ammar Askar <ammar@ammaraskar.com>
|
||||
Date: Sat, 20 Apr 2013 12:26:20 +0500
|
||||
Subject: [PATCH] Save entity counts for randomly spawned creatures to avoid
|
@ -1,4 +1,4 @@
|
||||
From 27614eec6fad59d37d7277c311ef1600dce32d0f Mon Sep 17 00:00:00 2001
|
||||
From 517269b20f3cc981e89795653662eae59ceda92e Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 23 Apr 2013 11:50:27 +1000
|
||||
Subject: [PATCH] Thread Naming and Tweaks
|
@ -1,4 +1,4 @@
|
||||
From 6b9bc24985f9e02501c20faa856bcb97cd03ea69 Mon Sep 17 00:00:00 2001
|
||||
From 452da8bd599aafae899e85e9be2bb9169748deef Mon Sep 17 00:00:00 2001
|
||||
From: Antony Riley <antony@cyberiantiger.org>
|
||||
Date: Wed, 27 Mar 2013 01:41:54 +0200
|
||||
Subject: [PATCH] Fixes BUKKIT-3893 - Close world save files when world is
|
||||
@ -19,7 +19,7 @@ index 900ed68..829f4a3 100644
|
||||
public static synchronized RegionFile a(File file1, int i, int j) {
|
||||
File file2 = new File(file1, "region");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fc9170f..bfa19e6 100644
|
||||
index 39311d9..f9da70f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -37,6 +37,8 @@ import net.minecraft.server.MinecraftServer;
|
@ -1,4 +1,4 @@
|
||||
From 981fe82c7589948286c156d36d8e1389504e0dd1 Mon Sep 17 00:00:00 2001
|
||||
From cf1ba399044a6d2b54c0c8fafdffd5cf425c5ebe Mon Sep 17 00:00:00 2001
|
||||
From: snowleo <schneeleo@gmail.com>
|
||||
Date: Wed, 8 May 2013 12:09:45 +1000
|
||||
Subject: [PATCH] Optimized version of LocaleLanguage
|
@ -1,4 +1,4 @@
|
||||
From ca1edfc3590c8004c79d68dda2fc9586faf1f0ff Mon Sep 17 00:00:00 2001
|
||||
From 124d31f511b7c24801f296c719b400c2b7c805e7 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Wed, 24 Apr 2013 01:43:33 -0500
|
||||
Subject: [PATCH] Improve next-tick-list performance on chunk unloads, large
|
||||
@ -19,21 +19,21 @@ index 52a70a1..08a4240 100644
|
||||
|
||||
public NextTickListEntry a(long i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 5bbf775..1b2526b 100644
|
||||
index 7b8e70c..93e7b9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -28,8 +28,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -25,8 +25,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
private final MinecraftServer server;
|
||||
public EntityTracker tracker; // CraftBukkit - private final -> public
|
||||
private final PlayerChunkMap manager;
|
||||
- private Set L;
|
||||
- private TreeSet M;
|
||||
+ private LongObjectHashMap<Set<NextTickListEntry>> tickEntriesByChunk; // Spigot - switch to something better for chunk-wise access
|
||||
+ private org.bukkit.craftbukkit.util.LongObjectHashMap<Set<NextTickListEntry>> tickEntriesByChunk; // Spigot - switch to something better for chunk-wise access
|
||||
+ private TreeSet<NextTickListEntry> tickEntryQueue; // Spigot
|
||||
public ChunkProviderServer chunkProviderServer;
|
||||
public boolean savingDisabled;
|
||||
private boolean N;
|
||||
@@ -38,7 +38,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -35,7 +35,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
private NoteDataList[] Q = new NoteDataList[] { new NoteDataList((EmptyClass2) null), new NoteDataList((EmptyClass2) null)};
|
||||
private int R = 0;
|
||||
private static final StructurePieceTreasure[] S = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)};
|
||||
@ -41,9 +41,9 @@ index 5bbf775..1b2526b 100644
|
||||
+ private ArrayList<NextTickListEntry> pendingTickEntries = new ArrayList<NextTickListEntry>(); // Spigot
|
||||
+ private int nextPendingTickEntry; // Spigot
|
||||
private IntHashMap entitiesById;
|
||||
private int aggregateTicks = 1; // Spigot
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -56,13 +57,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -54,13 +55,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ index 5bbf775..1b2526b 100644
|
||||
- this.L = new HashSet();
|
||||
+ // Spigot start
|
||||
+ if (this.tickEntriesByChunk == null) {
|
||||
+ this.tickEntriesByChunk = new LongObjectHashMap<Set<NextTickListEntry>>();
|
||||
+ this.tickEntriesByChunk = new org.bukkit.craftbukkit.util.LongObjectHashMap<Set<NextTickListEntry>>();
|
||||
}
|
||||
|
||||
- if (this.M == null) {
|
||||
@ -63,7 +63,7 @@ index 5bbf775..1b2526b 100644
|
||||
|
||||
this.P = new org.bukkit.craftbukkit.CraftTravelAgent(this); // CraftBukkit
|
||||
this.scoreboard = new ScoreboardServer(minecraftserver);
|
||||
@@ -458,9 +461,16 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -446,9 +449,16 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
|
||||
public boolean a(int i, int j, int k, int l) {
|
||||
@ -83,7 +83,7 @@ index 5bbf775..1b2526b 100644
|
||||
}
|
||||
|
||||
public void a(int i, int j, int k, int l, int i1) {
|
||||
@@ -493,10 +503,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -481,10 +491,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
nextticklistentry.a(j1);
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ index 5bbf775..1b2526b 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,10 +517,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -496,10 +505,9 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
nextticklistentry.a((long) i1 + this.worldData.getTime());
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 5bbf775..1b2526b 100644
|
||||
}
|
||||
|
||||
public void tickEntities() {
|
||||
@@ -531,11 +539,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -519,11 +527,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
|
||||
public boolean a(boolean flag) {
|
||||
@ -128,7 +128,7 @@ index 5bbf775..1b2526b 100644
|
||||
if (i > 1000) {
|
||||
// CraftBukkit start - If the server has too much to process over time, try to alleviate that
|
||||
if (i > 20 * 1000) {
|
||||
@@ -551,23 +560,24 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -539,23 +548,24 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
NextTickListEntry nextticklistentry;
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
@ -162,7 +162,7 @@ index 5bbf775..1b2526b 100644
|
||||
byte b0 = 0;
|
||||
|
||||
if (this.e(nextticklistentry.a - b0, nextticklistentry.b - b0, nextticklistentry.c - b0, nextticklistentry.a + b0, nextticklistentry.b + b0, nextticklistentry.c + b0)) {
|
||||
@@ -598,52 +608,18 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -586,52 +596,18 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
|
||||
this.methodProfiler.b();
|
||||
@ -224,7 +224,7 @@ index 5bbf775..1b2526b 100644
|
||||
}
|
||||
|
||||
public void entityJoinedWorld(Entity entity, boolean flag) {
|
||||
@@ -720,13 +696,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -708,13 +684,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ index 5bbf775..1b2526b 100644
|
||||
- this.L = new HashSet();
|
||||
+ // Spigot start
|
||||
+ if (this.tickEntriesByChunk == null) {
|
||||
+ this.tickEntriesByChunk = new LongObjectHashMap<Set<NextTickListEntry>>();
|
||||
+ this.tickEntriesByChunk = new org.bukkit.craftbukkit.util.LongObjectHashMap<Set<NextTickListEntry>>();
|
||||
}
|
||||
|
||||
- if (this.M == null) {
|
||||
@ -244,7 +244,7 @@ index 5bbf775..1b2526b 100644
|
||||
|
||||
this.b(worldsettings);
|
||||
super.a(worldsettings);
|
||||
@@ -1013,4 +991,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -1001,4 +979,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
return this.setTypeIdAndData(x, y, z, typeId, data, 3);
|
||||
}
|
||||
// CraftBukkit end
|
@ -1,4 +1,4 @@
|
||||
From 00ac7e5dcecf370c6b0a27efd7616dcf048148ce Mon Sep 17 00:00:00 2001
|
||||
From 4196630556c7156c4bd07043106c7efda89bc8ae Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 19 May 2013 18:29:48 +1000
|
||||
Subject: [PATCH] Remove -o Option
|
@ -1,4 +1,4 @@
|
||||
From 77e1bf77dd51af965b6ef71cf3879ee2d9f44c35 Mon Sep 17 00:00:00 2001
|
||||
From 749ed3b8ece5efc8940c84c22f648682f61235c4 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 1 Jun 2013 16:34:38 +1000
|
||||
Subject: [PATCH] Recipe Deconstruction
|
@ -1,4 +1,4 @@
|
||||
From beb2f19a478943f62747d6ec188220391db36904 Mon Sep 17 00:00:00 2001
|
||||
From b4c915c6e625586977b42d95d05365664f1838c9 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Minkler <sleaker@gmail.com>
|
||||
Date: Sun, 2 Jun 2013 14:54:11 +1000
|
||||
Subject: [PATCH] Fix Health Scaling
|
@ -1,4 +1,4 @@
|
||||
From 08ae7b4f283c01804d1ed35b480ae3f13e0106cb Mon Sep 17 00:00:00 2001
|
||||
From 6f656ab78d9cf3b7148cc6e675d3d581ffd2fc70 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Minkler <sleaker@gmail.com>
|
||||
Date: Sun, 2 Jun 2013 15:04:37 +1000
|
||||
Subject: [PATCH] Fix EntityShootBowEvent with Skeletons
|
@ -1,4 +1,4 @@
|
||||
From 238ce0151639dd4ae8f5b1ec9947344e4ad2eb57 Mon Sep 17 00:00:00 2001
|
||||
From 6f4a8bbd03060d87939bcb57883f34dbaad01993 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 15:16:05 +1000
|
||||
Subject: [PATCH] Implement Arrow API
|
@ -1,4 +1,4 @@
|
||||
From 1a85210af49a095faee82ac64512518a7dff9b53 Mon Sep 17 00:00:00 2001
|
||||
From d711bdcb5dcd3f2856cd4c79a6728999c1f13628 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 16:14:30 +1000
|
||||
Subject: [PATCH] Particle API
|
||||
@ -43,10 +43,10 @@ index 7de0de5..7eca388 100644
|
||||
datavalue = 0;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f07982d..a9a0a90 100644
|
||||
index 6218f16..d169b5f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -887,31 +887,21 @@ public class CraftWorld implements World {
|
||||
@@ -886,31 +886,21 @@ public class CraftWorld implements World {
|
||||
} else {
|
||||
Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!");
|
||||
}
|
||||
@ -88,7 +88,7 @@ index f07982d..a9a0a90 100644
|
||||
public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException {
|
||||
return spawn(location, clazz, SpawnReason.CUSTOM);
|
||||
}
|
||||
@@ -1390,6 +1380,62 @@ public class CraftWorld implements World {
|
||||
@@ -1389,6 +1379,62 @@ public class CraftWorld implements World {
|
||||
// Spigot start
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
From 5c6a727485881ecce2fd1c18b248cd3716e6476b Mon Sep 17 00:00:00 2001
|
||||
From 9c1f21f27cbccb321b8e155f9a93b2ca1f75bd87 Mon Sep 17 00:00:00 2001
|
||||
From: DerFlash <bte@freenet.de>
|
||||
Date: Sun, 2 Jun 2013 16:23:46 +1000
|
||||
Subject: [PATCH] Hopper Cooldowns
|
@ -1,4 +1,4 @@
|
||||
From 19b5dbf8e6b8a006cbc7820eda9788583ab28a41 Mon Sep 17 00:00:00 2001
|
||||
From 911080c0d3b2f3d1861dcda88acfd85c822a379f Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 11:54:32 +1000
|
||||
Subject: [PATCH] Prevent Shutdown Hang
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren