1.10 ItemStack crashes...
This commit is contained in:
parent
f3a3843dc8
commit
a9bdc384b9
|
|
@ -49,7 +49,7 @@ public class RenderEntityEvents
|
|||
if (event.getDwheel() > 0 || event.getDwheel() < 0 || Minecraft.getMinecraft().gameSettings.keyBindPickBlock.isPressed())
|
||||
{
|
||||
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItemMainhand();
|
||||
if (stack != null && stack.getItem() == RegistrationHandler.itemEntity)
|
||||
if (stack == null ? false : (stack.getItem() == RegistrationHandler.itemEntity))
|
||||
{
|
||||
if (ItemEntity.hasEntityData(stack))
|
||||
{
|
||||
|
|
@ -94,7 +94,7 @@ public class RenderEntityEvents
|
|||
field.setAccessible(true);
|
||||
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItemMainhand();
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (stack != null ? stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack) : false)
|
||||
if (stack != null ? (stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack)) : false)
|
||||
{
|
||||
if (settings.keyBindDrop.isPressed())
|
||||
{
|
||||
|
|
@ -136,7 +136,7 @@ public class RenderEntityEvents
|
|||
int perspective = Minecraft.getMinecraft().gameSettings.thirdPersonView;
|
||||
float partialticks = event.getPartialTicks();
|
||||
|
||||
if (stack != null ? stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack) : false)
|
||||
if (stack != null ? (stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack)) : false)
|
||||
{
|
||||
Entity entity = ItemEntity.getEntity(stack, world);
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class RenderEvents
|
|||
if (event.getDwheel() > 0 || event.getDwheel() < 0 || Minecraft.getMinecraft().gameSettings.keyBindPickBlock.isPressed())
|
||||
{
|
||||
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItemMainhand();
|
||||
if (stack != null && stack.getItem() == RegistrationHandler.itemTile)
|
||||
if (stack == null ? false : stack.getItem() == RegistrationHandler.itemTile)
|
||||
{
|
||||
if (ItemTile.hasTileData(stack))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ItemEntityEvents
|
|||
{
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
if (stack != null && stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack))
|
||||
if (stack == null ? false : (stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack)))
|
||||
{
|
||||
player.getEntityData().removeTag("carrySlot");
|
||||
event.setUseBlock(Result.DENY);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class ItemEvents
|
|||
{
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
if (stack != null && stack.getItem() == RegistrationHandler.itemTile && ItemTile.hasTileData(stack))
|
||||
if (stack == null ? false : (stack.getItem() == RegistrationHandler.itemTile && ItemTile.hasTileData(stack)))
|
||||
{
|
||||
player.getEntityData().removeTag("carrySlot");
|
||||
event.setUseBlock(Result.DENY);
|
||||
|
|
@ -103,7 +103,7 @@ public class ItemEvents
|
|||
World world = player.getEntityWorld();
|
||||
|
||||
ItemStack carried = player.getHeldItemMainhand();
|
||||
if (carried != null && carried.getItem() == RegistrationHandler.itemTile || carried.getItem() == RegistrationHandler.itemEntity)
|
||||
if (carried == null ? false : (carried.getItem() == RegistrationHandler.itemTile || carried.getItem() == RegistrationHandler.itemEntity))
|
||||
{
|
||||
if (carried.getItem() == RegistrationHandler.itemTile)
|
||||
{
|
||||
|
|
@ -139,7 +139,7 @@ public class ItemEvents
|
|||
World world = player.getEntityWorld();
|
||||
|
||||
ItemStack carried = player.getHeldItemMainhand();
|
||||
if (carried != null && carried.getItem() == RegistrationHandler.itemTile || carried.getItem() == RegistrationHandler.itemEntity)
|
||||
if (carried == null ? false : (carried.getItem() == RegistrationHandler.itemTile || carried.getItem() == RegistrationHandler.itemEntity))
|
||||
{
|
||||
if (carried.getItem() == RegistrationHandler.itemTile)
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ public class ItemEvents
|
|||
if(player != null)
|
||||
{
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
if(stack != null && (stack.getItem() == RegistrationHandler.itemTile || stack.getItem() == RegistrationHandler.itemEntity))
|
||||
if(stack == null ? false : (stack.getItem() == RegistrationHandler.itemTile || stack.getItem() == RegistrationHandler.itemEntity))
|
||||
event.setNewSpeed(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user