2015-01-05 04:32:01 +01:00
|
|
|
From 8352b919bb6ecfa2c51f99b9e427978d0fcc038a Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02: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
|
2014-11-28 02:17:45 +01:00
|
|
|
index 7f16401..e35f78f 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2014-11-28 02:17:45 +01:00
|
|
|
@@ -108,7 +108,7 @@ public class EntityItem extends Entity {
|
|
|
|
// Craftbukkit end */
|
2014-07-21 22:46:54 +02:00
|
|
|
|
2014-11-28 02:17:45 +01:00
|
|
|
this.W();
|
2014-07-21 22:46:54 +02:00
|
|
|
- if (!this.world.isStatic && this.age >= 6000) {
|
|
|
|
+ if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
|
|
|
// CraftBukkit start - fire ItemDespawnEvent
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
|
|
|
this.age = 0;
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
index 48ae475..6d31363 100644
|
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
@@ -198,4 +198,11 @@ public class SpigotWorldConfig
|
|
|
|
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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|