Patched a door crash bug
thanks LClouds
This commit is contained in:
@@ -75,7 +75,6 @@ public class EventHookContainer
|
|||||||
public void onSoundEffectResult(PlayBackgroundMusicEvent event)
|
public void onSoundEffectResult(PlayBackgroundMusicEvent event)
|
||||||
{
|
{
|
||||||
if (FMLClientHandler.instance().getClient().thePlayer.worldObj.provider.dimensionId == mod_pocketDim.properties.LimboDimensionID)
|
if (FMLClientHandler.instance().getClient().thePlayer.worldObj.provider.dimensionId == mod_pocketDim.properties.LimboDimensionID)
|
||||||
;
|
|
||||||
{
|
{
|
||||||
this.playMusicForDim(FMLClientHandler.instance().getClient().thePlayer.worldObj);
|
this.playMusicForDim(FMLClientHandler.instance().getClient().thePlayer.worldObj);
|
||||||
}
|
}
|
||||||
@@ -92,6 +91,8 @@ public class EventHookContainer
|
|||||||
World world = event.entity.worldObj;
|
World world = event.entity.worldObj;
|
||||||
ItemStack stack = event.entityPlayer.inventory.getCurrentItem();
|
ItemStack stack = event.entityPlayer.inventory.getCurrentItem();
|
||||||
if (stack != null && stack.getItem() instanceof ItemDoor)
|
if (stack != null && stack.getItem() instanceof ItemDoor)
|
||||||
|
{
|
||||||
|
if(BaseItemDoor.getDoorToPlace(stack.getItem())!=null)
|
||||||
{
|
{
|
||||||
if (mod_pocketDim.itemDimensionalDoor.tryToPlaceDoor(stack, event.entityPlayer, world,
|
if (mod_pocketDim.itemDimensionalDoor.tryToPlaceDoor(stack, event.entityPlayer, world,
|
||||||
event.x, event.y, event.z, event.face))
|
event.x, event.y, event.z, event.face))
|
||||||
@@ -101,6 +102,7 @@ public class EventHookContainer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ForgeSubscribe
|
@ForgeSubscribe
|
||||||
public void onWorldLoad(WorldEvent.Load event)
|
public void onWorldLoad(WorldEvent.Load event)
|
||||||
|
|||||||
Reference in New Issue
Block a user