Update from upstream SpigotMC

Add unbreakable API to item meta SpigotMC/Spigot@b1af008222
Configure how often EntityHangings calculate if they should die. SpigotMC/Spigot@ac6e1fc32d
Copy ItemStacks in DataWatcher to prevent ConcurrentModificationExcep… SpigotMC/Spigot@2af28ffbd1
Add the spigot.yml into the timings paste SpigotMC/Spigot@d61f38bd58

Note: This commit moves the entity-hanging tick into Spigot's spigot.yml and out of our paper.yml
This commit is contained in:
Zach Brown 2014-08-25 16:30:52 -05:00
parent c803f4dde1
commit c777f40058
15 changed files with 377 additions and 66 deletions

View File

@ -1,4 +1,4 @@
From 8436d82f19ccc283c93fa2a2a2df7621437dd5ae Mon Sep 17 00:00:00 2001
From ab1bf3d9c222ecff67093988fa4c00009986f871 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 2 Jun 2013 10:42:57 +1000
Subject: [PATCH] Spigot Timings
@ -8,7 +8,7 @@ Adds performance tracking timings all around the Minecraft Server, and improves
Plugins can track their own timings with CustomTimingsHandler
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 1eaf92d..7b25817 100644
index 1eaf92d..cc071c6 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -301,6 +301,7 @@ public final class Bukkit {
@ -19,6 +19,36 @@ index 1eaf92d..7b25817 100644
}
/**
@@ -747,4 +748,9 @@ public final class Bukkit {
public static UnsafeValues getUnsafe() {
return server.getUnsafe();
}
+
+ public static Server.Spigot spigot()
+ {
+ return server.spigot();
+ }
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index e14e9f1..573b33b 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -916,4 +916,15 @@ public interface Server extends PluginMessageRecipient {
*/
@Deprecated
UnsafeValues getUnsafe();
+
+ public class Spigot
+ {
+
+ public org.bukkit.configuration.file.YamlConfiguration getConfig()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+ }
+
+ Spigot spigot();
}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 87c33d9..31e4f66 100644
--- a/src/main/java/org/bukkit/command/Command.java
@ -68,10 +98,10 @@ index d75380c..f15b95d 100644
}
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
index 05cfcb0..22926d6 100644
index 05cfcb0..7907021 100644
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
@@ -19,23 +19,97 @@ import org.bukkit.util.StringUtil;
@@ -19,23 +19,101 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList;
@ -142,6 +172,10 @@ index 05cfcb0..22926d6 100644
+ CustomTimingsHandler.printTimings(fileTimings);
+ fileTimings.println( "Sample time " + sampleTime + " (" + sampleTime / 1E9 + "s)" );
+
+ fileTimings.println( "<spigotConfig>" );
+ fileTimings.println( Bukkit.spigot().getConfig().saveToString() );
+ fileTimings.println( "</spigotConfig>" );
+
+ if ( paste )
+ {
+ new PasteThread( sender, bout ).start();
@ -173,7 +207,7 @@ index 05cfcb0..22926d6 100644
if (!sender.getServer().getPluginManager().useTimings()) {
sender.sendMessage("Please enable timings by setting \"settings.plugin-profiling\" to true in bukkit.yml");
return true;
@@ -118,4 +192,55 @@ public class TimingsCommand extends BukkitCommand {
@@ -118,4 +196,55 @@ public class TimingsCommand extends BukkitCommand {
}
return ImmutableList.of();
}

View File

@ -0,0 +1,48 @@
From f5d98cb5c1e4609b3ff4f3eae09e1cf97792d6fa Mon Sep 17 00:00:00 2001
From: libraryaddict <redwarfare@live.com>
Date: Fri, 22 Aug 2014 05:31:04 -0400
Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index 397ba11..9ae3e4c 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -124,6 +124,34 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
*/
boolean hasConflictingEnchant(Enchantment ench);
+ // Spigot start
+ public class Spigot
+ {
+
+ /**
+ * Sets the unbreakable tag
+ *
+ * @param unbreakable true if set unbreakable
+ */
+ public void setUnbreakable(boolean unbreakable)
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ /**
+ * Return if the unbreakable tag is true
+ *
+ * @return true if the unbreakable tag is true
+ */
+ public boolean isUnbreakable()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+ }
+
+ Spigot spigot();
+ // Spigot end
+
@SuppressWarnings("javadoc")
ItemMeta clone();
}
--
1.9.1

View File

@ -1,10 +1,29 @@
From be8a0e8c5faf4bfda4034f4b9994e496d08cd159 Mon Sep 17 00:00:00 2001
From c62ed982d5f63622bbb66073f7cd9ef1e06db535 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations
This contains the basic, empty implementations for some Spigot-API extensions. They are included early in the patching progress so that compilation will still succeed midway despite the APIs only being provided by subsequent patches.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eb0b342..1fb4eeb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1768,4 +1768,14 @@ public final class CraftServer implements Server {
public UnsafeValues getUnsafe() {
return CraftMagicNumbers.INSTANCE;
}
+
+ private final Spigot spigot = new Spigot()
+ {
+
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f4dec5b..7112c77 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@ -82,6 +101,27 @@ index bbf310b..da0c78e 100644
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index c9738c4..32d4a67 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -665,4 +665,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
public final String toString() {
return SerializableMeta.classMap.get(getClass()) + "_META:" + serialize(); // TODO: cry
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ @Override
+ public Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
--

View File

@ -1,4 +1,4 @@
From b0b019f1d567c0c730eff3b2ee36d5a39577caa2 Mon Sep 17 00:00:00 2001
From 64b60c2a33fa65f80cf068f9ade86387259c0bba Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 7 Jul 2013 09:32:53 +1000
Subject: [PATCH] Spigot Configuration
@ -55,7 +55,7 @@ index 08c506c..12c613c 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eb0b342..d997b48 100644
index 1fb4eeb..9d45f34 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -323,8 +323,10 @@ public final class CraftServer implements Server {
@ -96,7 +96,7 @@ index eb0b342..d997b48 100644
int pollCount = 0;
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
new file mode 100644
index 0000000..14c1ab1
index 0000000..8ae9862
--- /dev/null
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -0,0 +1,138 @@
@ -134,7 +134,7 @@ index 0000000..14c1ab1
+ + "IRC: #spigot @ irc.spi.gt ( http://www.spigotmc.org/pages/irc/ )\n"
+ + "Forums: http://www.spigotmc.org/\n";
+ /*========================================================================*/
+ static YamlConfiguration config;
+ public static YamlConfiguration config;
+ static int version;
+ static Map<String, Command> commands;
+ /*========================================================================*/
@ -158,8 +158,8 @@ index 0000000..14c1ab1
+
+ commands = new HashMap<String, Command>();
+
+ version = getInt( "config-version", 6 );
+ set( "config-version", 6 );
+ version = getInt( "config-version", 7 );
+ set( "config-version", 7 );
+ readConfig( SpigotConfig.class, null );
+ }
+

View File

@ -1,4 +1,4 @@
From 9abee8e0c381e92a3bc16558af2bf3beb47c6c61 Mon Sep 17 00:00:00 2001
From 8df0254fd23f072d9cc05fc57b2c26de3c80da6f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Spigot Timings
@ -364,7 +364,7 @@ index 998de35..0a15416 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c240020..9596da2 100644
index 3a98439..69004ea 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -941,6 +941,8 @@ public class PlayerConnection implements PacketPlayInListener {
@ -574,6 +574,22 @@ index 8f25a15..d93eb8b 100644
}
public BiomeMeta a(EnumCreatureType enumcreaturetype, int i, int j, int k) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9d45f34..01de2fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1778,6 +1778,11 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
+ @Override
+ public YamlConfiguration getConfig()
+ {
+ return org.spigotmc.SpigotConfig.config;
+ }
};
public Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c76c3d3..28aa997 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java

View File

@ -1,9 +1,53 @@
From 9fb3a495d25e376af9ecfaac0843ba6e339cc7d8 Mon Sep 17 00:00:00 2001
From 79e19a02fa34f4ad5f2e2d9446ca55fd8720bbed Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Wed, 2 Jul 2014 23:35:51 +0100
Subject: [PATCH] Better item validation
diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java
index e368514..395d054 100644
--- a/src/main/java/net/minecraft/server/DataWatcher.java
+++ b/src/main/java/net/minecraft/server/DataWatcher.java
@@ -149,6 +149,17 @@ public class DataWatcher {
arraylist = new ArrayList();
}
+ // Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions
+ if ( watchableobject.b() instanceof ItemStack )
+ {
+ watchableobject = new WatchableObject(
+ watchableobject.c(),
+ watchableobject.a(),
+ ( (ItemStack) watchableobject.b() ).cloneItemStack()
+ );
+ }
+ // Spigot end
+
arraylist.add(watchableobject);
}
}
@@ -180,6 +191,21 @@ public class DataWatcher {
this.f.readLock().lock();
arraylist.addAll(this.dataValues.valueCollection()); // Spigot
+ // Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions
+ for ( int i = 0; i < arraylist.size(); i++ )
+ {
+ WatchableObject watchableobject = (WatchableObject) arraylist.get( i );
+ if ( watchableobject.b() instanceof ItemStack )
+ {
+ watchableobject = new WatchableObject(
+ watchableobject.c(),
+ watchableobject.a(),
+ ( (ItemStack) watchableobject.b() ).cloneItemStack()
+ );
+ arraylist.set( i, watchableobject );
+ }
+ }
+ // Spigot end
this.f.readLock().unlock();
return arraylist;
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
index a5be533..e4df5b3 100644
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
@ -58,7 +102,7 @@ index 1cf8fce..bdc6364 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index c9738c4..ec37524 100644
index 32d4a67..53c3f6c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -36,6 +36,10 @@ import com.google.common.base.Strings;

View File

@ -0,0 +1,130 @@
From 3c80c2ee11b3d14fee29c43455ee7433bc740ff5 Mon Sep 17 00:00:00 2001
From: libraryaddict <redwarfare@live.com>
Date: Fri, 22 Aug 2014 05:35:16 -0400
Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 7a1536f..f7a7adc 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -201,6 +201,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
static final ItemMetaKey ATTRIBUTES_UUID_HIGH = new ItemMetaKey("UUIDMost");
@Specific(Specific.To.NBT)
static final ItemMetaKey ATTRIBUTES_UUID_LOW = new ItemMetaKey("UUIDLeast");
+ static final ItemMetaKey UNBREAKABLE = new ItemMetaKey("Unbreakable"); // Spigot
private String displayName;
private List<String> lore;
@@ -226,6 +227,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
this.repairCost = meta.repairCost;
this.attributes = meta.attributes;
+ spigot.setUnbreakable( meta.spigot.isUnbreakable() ); // Spigot
}
CraftMetaItem(NBTTagCompound tag) {
@@ -418,6 +420,12 @@ class CraftMetaItem implements ItemMeta, Repairable {
} else {
attributes = null;
}
+ // Spigot start
+ if ( tag.hasKey( UNBREAKABLE.NBT ) )
+ {
+ spigot.setUnbreakable( tag.getBoolean( UNBREAKABLE.NBT ) );
+ }
+ // Spigot end
}
static Map<Enchantment, Integer> buildEnchantments(NBTTagCompound tag, ItemMetaKey key) {
@@ -458,6 +466,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
attributes = null;
+ // Spigot start
+ Boolean unbreakable = SerializableMeta.getObject( Boolean.class, map, UNBREAKABLE.BUKKIT, true );
+ if ( unbreakable != null )
+ {
+ spigot.setUnbreakable( unbreakable );
+ }
+ // Spigot end
}
static Map<Enchantment, Integer> buildEnchantments(Map<String, Object> map, ItemMetaKey key) {
@@ -490,6 +505,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
+ // Spigot start
+ if ( spigot.isUnbreakable() )
+ {
+ itemTag.setBoolean( UNBREAKABLE.NBT, true );
+ }
+ // Spigot end
+
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
}
@@ -548,7 +570,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@Overridden
boolean isEmpty() {
- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost());
+ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || spigot.isUnbreakable()); // Spigot
}
public String getDisplayName() {
@@ -672,7 +694,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants())
&& (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore())
&& (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes())
- && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost());
+ && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) && this.spigot.isUnbreakable() == that.spigot.isUnbreakable(); // Spigot
}
/**
@@ -698,6 +720,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
+ hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot
return hash;
}
@@ -741,6 +764,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
builder.put(REPAIR.BUKKIT, repairCost);
}
+ // Spigot start
+ if ( spigot.isUnbreakable() )
+ {
+ builder.put( UNBREAKABLE.BUKKIT, true );
+ }
+ // Spigot end
+
return builder;
}
@@ -803,6 +833,19 @@ class CraftMetaItem implements ItemMeta, Repairable {
// Spigot start
private final Spigot spigot = new Spigot()
{
+ private boolean unbreakable;
+
+ @Override
+ public void setUnbreakable(boolean setUnbreakable)
+ {
+ unbreakable = setUnbreakable;
+ }
+
+ @Override
+ public boolean isUnbreakable()
+ {
+ return unbreakable;
+ }
};
@Override
--
1.9.1

View File

@ -0,0 +1,37 @@
From 4ab2de78028f2bfb974d46f49ba0c2cc27e020d8 Mon Sep 17 00:00:00 2001
From: drXor <mcyoung@mit.edu>
Date: Sat, 9 Aug 2014 13:56:51 -0400
Subject: [PATCH] Configurable Hanging Tick
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
index eec465b..106a15b 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -102,7 +102,7 @@ public abstract class EntityHanging extends Entity {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
- if (this.e++ == 100 && !this.world.isStatic) {
+ if (this.e++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isStatic) { // Spigot - 100 -> this.world.spigotConfig.hangingTickFrequency
this.e = 0;
if (!this.dead && !this.survives()) {
// CraftBukkit start - fire break events
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 5e3dbf9..854ba6d 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -349,4 +349,10 @@ public class SpigotWorldConfig
maxTntTicksPerTick = getInt( "max-tnt-per-tick", 100 );
log( "Max TNT Explosions: " + maxTntTicksPerTick );
}
+
+ public int hangingTickFrequency;
+ private void hangingTickFrequency()
+ {
+ hangingTickFrequency = getInt( "hanging-tick-frequency", 100 );
+ }
}
--
1.9.1

View File

@ -1,4 +1,4 @@
From be2044b8ee40fa5f69689f00f61a6345d13afbc0 Mon Sep 17 00:00:00 2001
From 26bc003c330544b2ff61c6ab19aa2f45030d1917 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Mon, 28 Jul 2014 03:26:50 -0500
Subject: [PATCH] Stop using spigot's website for timings
@ -6,10 +6,10 @@ Subject: [PATCH] Stop using spigot's website for timings
There's no reason to do so at all, the fact that it just exists as a redirect is both odd and unnecessary
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
index 22926d6..77e846e 100644
index 7907021..94ce5dc 100644
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
@@ -90,7 +90,7 @@ public class TimingsCommand extends BukkitCommand {
@@ -94,7 +94,7 @@ public class TimingsCommand extends BukkitCommand {
}
sender.sendMessage("Timings written to " + timings.getPath());
@ -18,7 +18,7 @@ index 22926d6..77e846e 100644
} catch (IOException e) {
} finally {
@@ -234,7 +234,7 @@ public class TimingsCommand extends BukkitCommand {
@@ -238,7 +238,7 @@ public class TimingsCommand extends BukkitCommand {
String location = con.getHeaderField( "Location" );
String pasteID = location.substring( "http://paste.ubuntu.com/".length(), location.length() - 1 );

View File

@ -1,38 +0,0 @@
From b376680ab8cd0bd29566e11b7879db8b6cc83fed Mon Sep 17 00:00:00 2001
From: drXor <mcyoung@mit.edu>
Date: Sat, 9 Aug 2014 17:24:20 -0500
Subject: [PATCH] Configurable hanging tick
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
index eec465b..3b6d152 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -102,7 +102,7 @@ public abstract class EntityHanging extends Entity {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
- if (this.e++ == 100 && !this.world.isStatic) {
+ if (this.e++ == this.world.paperSpigotConfig.hangingTickFrequency && !this.world.isStatic) { // PaperSpigot - 100 -> this.world.paperSpigotConfig.hangingTickFrequency
this.e = 0;
if (!this.dead && !this.survives()) {
// CraftBukkit start - fire break events
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index ce3fb73..552a53c 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -171,4 +171,11 @@ public class PaperSpigotWorldConfig
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed);
}
+
+ public int hangingTickFrequency;
+ private void hangingTickSpeed()
+ {
+ hangingTickFrequency = getInt( "hanging-tick-frequency", 100);
+ log( "Hanging entities tick frequency: " + hangingTickFrequency);
+ }
}
--
1.9.1

View File

@ -1,4 +1,4 @@
From 593eb666fbbc94ad31d0fa8edc1b396609c57817 Mon Sep 17 00:00:00 2001
From 5c5e8954b5e7d29be492b59ddbdc182739df6133 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Tue, 19 Aug 2014 14:21:37 -0500
Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and

View File

@ -1,4 +1,4 @@
From 8054c4bd0e8f23cb928f3668364a3a356e6c600b Mon Sep 17 00:00:00 2001
From dd86a4e2b6efc65d344357aa91d81245346fb0d7 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Tue, 19 Aug 2014 14:25:40 -0500
Subject: [PATCH] RIP metrics
@ -657,7 +657,7 @@ index d9c3b63..0000000
-}
\ No newline at end of file
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 919c83c..3b43e0f 100644
index 3d089dc..211fb6e 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -48,7 +48,6 @@ public class SpigotConfig

View File

@ -1,4 +1,4 @@
From 26a71dce3043888ddf32b404a9e01d11513b9e79 Mon Sep 17 00:00:00 2001
From 4e8f6f02b5c941a718f1a60e31a198e3ac717cad Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 19 Aug 2014 14:51:28 -0500
Subject: [PATCH] Remove invalid mob spawner tile entities
@ -21,12 +21,12 @@ index 0423ee9..9454d4f 100644
} else {
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.x + "," + tileentity.y + "," + tileentity.z
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 552a53c..b6757ac 100644
index ce3fb73..753bdda 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -178,4 +178,11 @@ public class PaperSpigotWorldConfig
hangingTickFrequency = getInt( "hanging-tick-frequency", 100);
log( "Hanging entities tick frequency: " + hangingTickFrequency);
@@ -171,4 +171,11 @@ public class PaperSpigotWorldConfig
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed);
}
+
+ public boolean removeInvalidMobSpawnerTEs;