2013-12-21 23:05:27 +00:00
|
|
|
From dd603179f1246321346cd3394a2fb2a6f762e92a Mon Sep 17 00:00:00 2001
|
2013-09-22 09:11:09 +00:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Sun, 22 Sep 2013 19:10:53 +1000
|
|
|
|
Subject: [PATCH] Item Despawn Rate
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
2013-12-01 03:40:53 +00:00
|
|
|
index 08b9ac8..8ea7abc 100644
|
2013-09-22 09:11:09 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2013-12-01 03:40:53 +00:00
|
|
|
@@ -104,7 +104,7 @@ public class EntityItem extends Entity {
|
|
|
|
}
|
2013-09-22 09:11:09 +00:00
|
|
|
|
2013-12-01 03:40:53 +00:00
|
|
|
// ++this.age; // CraftBukkit - Moved up
|
|
|
|
- if (!this.world.isStatic && this.age >= 6000) {
|
|
|
|
+ if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
|
|
|
// CraftBukkit start
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
|
|
|
this.age = 0;
|
2013-09-22 09:11:09 +00:00
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2013-12-13 00:10:33 +00:00
|
|
|
index a4cdc7a..0b4e527 100644
|
2013-09-22 09:11:09 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2013-12-13 00:10:33 +00:00
|
|
|
@@ -192,4 +192,11 @@ public class SpigotWorldConfig
|
2013-09-22 09:11:09 +00:00
|
|
|
log( "*** WARNING *** Please use this option with caution, SpigotMC is not responsible for any issues this option may cause in the future!" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public int itemDespawnRate;
|
|
|
|
+ private void itemDespawnRate()
|
|
|
|
+ {
|
|
|
|
+ itemDespawnRate = getInt( "item-despawn-rate", 6000 );
|
|
|
|
+ log( "Item Despawn Rate: " + itemDespawnRate );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2013-12-01 03:40:53 +00:00
|
|
|
1.8.3.2
|
2013-09-22 09:11:09 +00:00
|
|
|
|