Added missing SideOnly annotations

* Added @SideOnly(Side.CLIENT) to methods that override methods that are
@SideOnly(Side.CLIENT).
* Added @SideOnly(Side.CLIENT) to classes that extend classes that are
@SideOnly(Side.CLIENT)
* Added @SideOnly(Side.CLIENT) to ClientProxy class
This commit is contained in:
HenryLoenwind committed 2015-02-18 02:18:53 +01:00
1 parent 452934ffdc
commit 5da6a47420
85 files changed
+558 -401

No files matched your search

@@ -10,6 +10,8 @@ import net.minecraft.item.ItemBlockWithMetadata;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import crazypants.enderio.EnderIO;
import crazypants.enderio.ModObject;
@@ -20,11 +22,11 @@ public class BlockItemBuffer extends ItemBlockWithMetadata {
POWER(false, true, false),
OMNI(true, true, false),
CREATIVE(true, true, true);
final boolean hasInventory;
final boolean hasPower;
final boolean isCreative;
private Type(boolean hasInventory, boolean hasPower, boolean isCreative) {
this.hasInventory = hasInventory;
this.hasPower = hasPower;
@@ -34,7 +36,7 @@ public class BlockItemBuffer extends ItemBlockWithMetadata {
public static Type get(TileBuffer buffer) {
return !buffer.hasPower() ? ITEM : !buffer.hasInventory() ? POWER : !buffer.isCreative() ? OMNI : CREATIVE;
}
public String getUnlocalizedName() {
return "tile." + ModObject.blockBuffer.unlocalisedName + "." + name().toLowerCase();
}
@@ -43,24 +45,25 @@ public class BlockItemBuffer extends ItemBlockWithMetadata {
return new ItemStack(EnderIO.blockBuffer, 1, type.ordinal());
}
}
public BlockItemBuffer(Block block) {
super(block, block);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
for (Type type : Type.values()) {
list.add(new ItemStack(item, 1, type.ordinal()));
}
}
@Override
public String getUnlocalizedName(ItemStack stack) {
return Type.values()[stack.getItemDamage()].getUnlocalizedName();
}
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) {
super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);