diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index 3b04c81cffe..19d678a18d1 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -286,6 +286,8 @@ public static class Spawntercepter { @SubscribeEvent public void onEntitySpawn(EntityJoinWorldEvent event) { + // return if config is zero to keep vanilla functionality + if (PHConstruct.globalDespawn == 0) return; if (event.entity instanceof EntityItem) { EntityItem ourGuy = (EntityItem) event.entity; if (ourGuy.lifespan == 6000) { diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java index ff9fec53a64..a8b5fe2ef8f 100644 --- a/src/main/java/tconstruct/util/config/PHConstruct.java +++ b/src/main/java/tconstruct/util/config/PHConstruct.java @@ -71,10 +71,14 @@ public static void initProps(File location) { "Difficulty Changes", "Add alternative recipe for bolt parts: arrowhead + toolrod in a crafting grid", false).getBoolean(false); - indestructible = config.get("Difficulty Changes", "Dropped tools are indestructible", false).getBoolean(false); - globalDespawn = config.get("Difficulty Changes", "Global item despawn time", 18000).getInt(18000); - dropCanisters = config.get("Difficulty Changes", "Drop heart canisters on death", true).getBoolean(true); - daggerThrowMultiplier = config.get("Difficulty Changes", "Thrown dagger output multiplier", 3).getDouble(3); + indestructible = config.get("Difficulty Changes", "Dropped tools are indestructible", true).getBoolean(true); + globalDespawn = config.get( + "Difficulty Changes", + "Global item despawn time", + 0, + "Changes the despawn time of all items, 0 is vanilla behavior").getInt(0); + dropCanisters = config.get("Difficulty Changes", "Drop heart canisters on death", false).getBoolean(false); + daggerThrowMultiplier = config.get("Difficulty Changes", "Thrown dagger output multiplier", 1).getDouble(1); naturalSlimeSpawn = config.get("Mobs", "Blue Slime spawn chance", 1, "Set to 0 to disable").getInt(1);