Respect keepLimboInventory config

This commit is contained in:
StevenRS11
2013-09-06 15:43:22 -04:00
parent cff13e9bb5
commit 9587f914c2
2 changed files with 5 additions and 2 deletions

View File

@@ -76,10 +76,15 @@ public class EventHookContainer
Entity entity = event.entity; Entity entity = event.entity;
if(entity instanceof EntityPlayer&&entity.worldObj.provider instanceof PocketProvider && this.properties.LimboEnabled) if(entity instanceof EntityPlayer&&entity.worldObj.provider instanceof PocketProvider && this.properties.LimboEnabled)
{ {
if(!this.properties.LimboReturnsInventoryEnabled)
{
((EntityPlayer)entity).inventory.clearInventory(-1, -1);
}
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(entity.worldObj.rand); ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(entity.worldObj.rand);
DDTeleporter.teleportEntity(entity, new Point4D(coords.posX,coords.posY,coords.posZ,mod_pocketDim.properties.LimboDimensionID)); DDTeleporter.teleportEntity(entity, new Point4D(coords.posX,coords.posY,coords.posZ,mod_pocketDim.properties.LimboDimensionID));
((EntityLiving) entity).setEntityHealth(20); ((EntityLiving) entity).setEntityHealth(20);
event.setCanceled(true); event.setCanceled(true);
return false;
} }
return true; return true;
} }

View File

@@ -116,8 +116,6 @@ public class mod_pocketDim
public static PlayerRespawnTracker tracker; public static PlayerRespawnTracker tracker;
public static HashMap<String,ArrayList<EntityItem>> limboSpawnInventory = new HashMap<String,ArrayList<EntityItem>>();
public static boolean isPlayerWearingGoogles = false; public static boolean isPlayerWearingGoogles = false;
public static DDProperties properties; public static DDProperties properties;