made despawn protection time configurable, set default to the (per comment) intended 2 minutes

This commit is contained in:
Matthias Mann committed 2015-02-22 22:30:24 +01:00
1 parent d6d32becc9
commit e79f012a87
3 files changed
+6 -3

No files matched your search

@@ -193,7 +193,7 @@ public class BlockPoweredSpawner extends AbstractMachineBlock<TilePoweredSpawner
long spawnTime = ent.getEntityData().getLong(KEY_SPAWNED_BY_POWERED_SPAWNER);
long livedFor = livingUpdate.entity.worldObj.getTotalWorldTime() - spawnTime;
if(livedFor > 1200) { //after two minutes stop forcing it to be around
if(livedFor > Config.poweredSpawnerDespawnTimeSeconds*20) {
try {
fieldpersistenceRequired.setBoolean(livingUpdate.entityLiving, false);
ent.getEntityData().removeTag(KEY_SPAWNED_BY_POWERED_SPAWNER);