2014-07-21 22:46:54 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
@@ -0,0 +0,0 @@ public class EntityItem extends Entity {
|
2016-02-29 22:33:06 +01:00
|
|
|
// Craftbukkit end */
|
2015-02-28 12:36:22 +01:00
|
|
|
|
2016-02-29 22:33:06 +01:00
|
|
|
this.aj();
|
2015-02-28 12:36:22 +01:00
|
|
|
- if (!this.world.isClientSide && this.age >= 6000) {
|
|
|
|
+ if (!this.world.isClientSide && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
2014-07-21 22:46:54 +02: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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
2016-02-29 22:33:06 +01:00
|
|
|
mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 );
|
|
|
|
log( "Mob Spawn Range: " + mobSpawnRange );
|
2014-07-21 22:46:54 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public int itemDespawnRate;
|
|
|
|
+ private void itemDespawnRate()
|
|
|
|
+ {
|
|
|
|
+ itemDespawnRate = getInt( "item-despawn-rate", 6000 );
|
|
|
|
+ log( "Item Despawn Rate: " + itemDespawnRate );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|