mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Closes #911
This commit is contained in:
parent
228cd55387
commit
1abb89c512
3 changed files with 6 additions and 9 deletions
|
@ -43,6 +43,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){
|
||||
IBlockState otherState = world.getBlockState(pos.offset(side));
|
||||
|
|
|
@ -60,16 +60,16 @@ public class ItemChestToCrateUpgrade extends ItemBase{
|
|||
ItemStack[] stacks = new ItemStack[chest.getSlots()];
|
||||
for(int i = 0; i < stacks.length; i++){
|
||||
ItemStack aStack = chest.getStackInSlot(i);
|
||||
if(StackUtil.isValid(aStack)){
|
||||
stacks[i] = aStack.copy();
|
||||
}
|
||||
}
|
||||
|
||||
//Set New Block
|
||||
world.playEvent(2001, pos, Block.getStateId(world.getBlockState(pos)));
|
||||
|
||||
world.removeTileEntity(pos);
|
||||
world.setBlockState(pos, this.end, 2);
|
||||
if(!player.capabilities.isCreativeMode)
|
||||
heldStack.shrink(1);
|
||||
|
||||
//Copy Items into new Chest
|
||||
TileEntity newTileHit = world.getTileEntity(pos);
|
||||
|
@ -84,17 +84,13 @@ public class ItemChestToCrateUpgrade extends ItemBase{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
player.setHeldItem(hand, StackUtil.addStackSize(heldStack, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
return world.isRemote ? EnumActionResult.PASS : EnumActionResult.SUCCESS;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return super.onItemUseFirst(player, world, pos, side, hitX, hitY, hitZ, hand);
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -101,7 +101,7 @@ public final class AwfulUtil{
|
|||
int i = 0;
|
||||
String error = "Actually Additions: Something is incredibly wrong. I don't know what you did, or how this method got called. But something is just completely wrong. This method was provided with ";
|
||||
for(Object k : stuff) {
|
||||
error += ("\n" + i++ + ":" + (k == null ? "null" : (k.getClass() + "<- CLASS | INSTANCE ->" + k.toString() + ", ")));
|
||||
error += ("\n" + i++ + ": " + (k == null ? "null" : (k.getClass().getSimpleName() + " <- CLASS | INSTANCE -> " + k.toString() + ", ")));
|
||||
}
|
||||
error += "\n" + "The current side is: " + FMLCommonHandler.instance().getEffectiveSide();
|
||||
throw new IllegalStateException(error);
|
||||
|
|
Loading…
Reference in a new issue