2015-07-27 12:20:54 +00:00
|
|
|
From c2bf94e9b17ef38629028376bce393386400fe09 Mon Sep 17 00:00:00 2001
|
2014-07-21 20:46:54 +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
|
2015-07-27 12:20:54 +00:00
|
|
|
index b80801a..abd85b0 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2015-06-06 09:47:02 +00:00
|
|
|
@@ -108,7 +108,7 @@ public class EntityItem extends Entity {
|
2015-02-28 11:36:22 +00:00
|
|
|
|
2014-07-21 20:46:54 +00:00
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
this.W();
|
2015-02-28 11:36:22 +00:00
|
|
|
- if (!this.world.isClientSide && this.age >= 6000) {
|
|
|
|
+ if (!this.world.isClientSide && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
2014-07-21 20:46:54 +00:00
|
|
|
// 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
|
2015-05-26 09:16:27 +00:00
|
|
|
index 15cb6b4..efbfa2e 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2015-05-26 09:16:27 +00:00
|
|
|
@@ -200,4 +200,11 @@ public class SpigotWorldConfig
|
2014-07-21 20:46:54 +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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-05-09 20:23:26 +00:00
|
|
|
2.1.4
|
2014-07-21 20:46:54 +00:00
|
|
|
|