Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
39 Zeilen
1.6 KiB
Diff
39 Zeilen
1.6 KiB
Diff
From b991c9bc542ce11cc8d07f7b2c6f9ab2152cc12e 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 7ea1150..eb0f8eb 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -109,7 +109,7 @@ public class EntityItem extends Entity {
|
|
// Craftbukkit end */
|
|
|
|
this.aj();
|
|
- if (!this.world.isClientSide && this.age >= 6000) {
|
|
+ if (!this.world.isClientSide && 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 cacb8fc..ca888fc 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -129,4 +129,11 @@ public class SpigotWorldConfig
|
|
mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 );
|
|
log( "Mob Spawn Range: " + mobSpawnRange );
|
|
}
|
|
+
|
|
+ public int itemDespawnRate;
|
|
+ private void itemDespawnRate()
|
|
+ {
|
|
+ itemDespawnRate = getInt( "item-despawn-rate", 6000 );
|
|
+ log( "Item Despawn Rate: " + itemDespawnRate );
|
|
+ }
|
|
}
|
|
--
|
|
2.5.0
|
|
|