Respect keepLimboInventory config
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,8 +115,6 @@ public class mod_pocketDim
|
|||||||
public static BiomeGenBase pocketBiome;
|
public static BiomeGenBase pocketBiome;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user