use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class BlockReinforcedPurpur method getSubBlocks.
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
list.add(new ItemStack(this, 1, BlockReinforcedPurpur.EnumType.DEFAULT.getMetadata()));
list.add(new ItemStack(this, 1, BlockReinforcedPurpur.EnumType.LINES_Y.getMetadata()));
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class BlockReinforcedNewLog method getSubBlocks.
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list) {
list.add(new ItemStack(itemIn, 1, BlockPlanks.EnumType.ACACIA.getMetadata() - 4));
list.add(new ItemStack(itemIn, 1, BlockPlanks.EnumType.DARK_OAK.getMetadata() - 4));
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class BlockReinforcedPurpur method getSubBlocks.
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list) {
list.add(new ItemStack(itemIn, 1, BlockReinforcedPurpur.EnumType.DEFAULT.getMetadata()));
list.add(new ItemStack(itemIn, 1, BlockReinforcedPurpur.EnumType.LINES_Y.getMetadata()));
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class ItemKeycardBase method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, World world, List par3List, ITooltipFlag flagIn) {
if (level == 3) {
if (par1ItemStack.getTagCompound() == null) {
par1ItemStack.setTagCompound(new NBTTagCompound());
par1ItemStack.getTagCompound().setInteger("Uses", 5);
}
par3List.add(ClientUtils.localize("tooltip.keycard.uses") + " " + par1ItemStack.getTagCompound().getInteger("Uses"));
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class ItemBlockReinforcedSlabs2 method canPlaceBlockOnSide.
@Override
@SideOnly(Side.CLIENT)
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side, EntityPlayer player, ItemStack stack) {
BlockPos blockpos1 = pos;
IProperty iproperty = singleSlab.getVariantProperty();
Object object = singleSlab.getVariant(stack);
IBlockState iblockstate = worldIn.getBlockState(pos);
if (iblockstate.getBlock() == singleSlab) {
boolean flag = iblockstate.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP;
if ((side == EnumFacing.UP && !flag || side == EnumFacing.DOWN && flag) && object == iblockstate.getValue(iproperty))
return true;
}
pos = pos.offset(side);
IBlockState iblockstate1 = worldIn.getBlockState(pos);
return iblockstate1.getBlock() == singleSlab && object == iblockstate1.getValue(iproperty) ? true : super.canPlaceBlockOnSide(worldIn, blockpos1, side, player, stack);
}
Aggregations