Patched a door crash bug

thanks LClouds
This commit is contained in:
StevenRS11 2014-05-26 22:23:36 -04:00
parent ac9b3d73e8
commit 7da3b7fc62

View file

@ -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)