2014-03-23 00:06:43 +00:00
|
|
|
From 19123d8bf2c9f08c6b05a00832502c7d17814324 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
|
2014-03-23 00:06:43 +00:00
|
|
|
index 95beb11..0f1bcc7 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
|
2014-03-23 00:06:43 +00:00
|
|
|
// CraftBukkit start - fire ItemDespawnEvent
|
2013-12-01 03:40:53 +00:00
|
|
|
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
|
2014-03-09 21:37:28 +00:00
|
|
|
index 9586c44..82d59e7 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
|
2014-01-14 08:16:43 +00:00
|
|
|
@@ -196,4 +196,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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-03-23 00:06:43 +00:00
|
|
|
1.8.5.2.msysgit.0
|
2013-09-22 09:11:09 +00:00
|
|
|
|