use of com.teamwizardry.wizardry.common.tile.TileManaBattery in project Wizardry by TeamWizardry.
the class BlockCreativeManaBattery method onBlockActivated.
@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (playerIn.isCreative() && playerIn.isSneaking()) {
tickStructure(worldIn, playerIn, pos);
} else {
TileEntity tile = worldIn.getTileEntity(pos);
if (tile == null || !(tile instanceof TileManaBattery))
return false;
else {
((TileManaBattery) tile).revealStructure = !((TileManaBattery) tile).revealStructure;
tile.markDirty();
}
}
return true;
}
use of com.teamwizardry.wizardry.common.tile.TileManaBattery in project Wizardry by TeamWizardry.
the class BlockManaBattery method onBlockActivated.
@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (playerIn.isCreative() && playerIn.isSneaking()) {
tickStructure(worldIn, playerIn, pos);
} else {
TileManaBattery tile = (TileManaBattery) worldIn.getTileEntity(pos);
if (tile == null)
return false;
tile.revealStructure = !tile.revealStructure;
tile.markDirty();
}
return true;
}
Aggregations