Compiles corporea dispenser mana and string block subpkgs

This commit is contained in:
Vincent Lee committed 2017-01-05 01:11:09 -06:00
1 parent 44a8fe17eb
commit a8558ea9a1
18 files changed
+70 -57

No files matched your search

@@ -65,21 +65,22 @@ public class BlockRuneAltar extends BlockMod implements IWandable, ILexiconable
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing side, float par7, float par8, float par9) {
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float par7, float par8, float par9) {
if(world.isRemote)
return true;
TileRuneAltar altar = (TileRuneAltar) world.getTileEntity(pos);
ItemStack stack = player.getHeldItem(hand);
if(player.isSneaking()) {
if(altar.manaToGet == 0) {
InventoryHelper.withdrawFromInventory(altar, player);
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(altar);
}
} else if(altar.isEmpty() && stack == null) {
} else if(altar.isEmpty() && stack.isEmpty()) {
altar.trySetLastRecipe(player);
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(altar);
} else if(stack != null) {
} else if(!stack.isEmpty()) {
boolean result = altar.addItem(player, stack, hand);
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(altar);
return result;