From 501174201e42c20d26e47a99df50457f43a492fc Mon Sep 17 00:00:00 2001 From: LemADEC Date: Fri, 12 May 2017 20:38:05 +0200 Subject: [PATCH] Removed icons handling from server side --- .../warpdrive/block/BlockChunkLoader.java | 11 ++++- .../java/cr0s/warpdrive/block/BlockLaser.java | 15 ++++-- .../warpdrive/block/BlockLaserMedium.java | 28 ++++++----- .../atomic/BlockAcceleratorControlPoint.java | 4 +- .../warpdrive/block/atomic/BlockChiller.java | 4 +- .../block/atomic/BlockElectromagnetGlass.java | 1 + .../block/atomic/BlockElectromagnetPlain.java | 7 +++ .../block/atomic/BlockParticlesInjector.java | 4 +- .../block/breathing/BlockAbstractAir.java | 2 + .../block/breathing/BlockAirGenerator.java | 15 ++++-- .../breathing/BlockAirGeneratorTiered.java | 11 +++-- .../block/building/BlockShipScanner.java | 10 ++-- .../block/collection/BlockLaserTreeFarm.java | 23 +++++---- .../block/collection/BlockMiningLaser.java | 19 ++++---- .../block/detection/BlockCamera.java | 11 ++++- .../block/detection/BlockCloakingCoil.java | 22 +++++---- .../block/detection/BlockCloakingCore.java | 14 ++++-- .../block/detection/BlockMonitor.java | 9 ++++ .../warpdrive/block/detection/BlockRadar.java | 20 +++++--- .../warpdrive/block/detection/BlockSiren.java | 3 +- .../block/detection/BlockWarpIsolation.java | 15 ++++-- .../block/energy/BlockEnanReactorCore.java | 47 +++++++++++-------- .../block/energy/BlockEnanReactorLaser.java | 19 ++++++-- .../block/energy/BlockEnergyBank.java | 4 ++ .../energy/BlockIC2reactorLaserMonitor.java | 14 ++++-- .../block/forcefield/BlockForceField.java | 6 ++- .../forcefield/BlockForceFieldProjector.java | 4 ++ .../forcefield/BlockForceFieldRelay.java | 4 ++ .../block/hull/BlockHullOmnipanel.java | 4 +- .../warpdrive/block/hull/BlockHullPlain.java | 6 +-- .../warpdrive/block/hull/BlockHullSlab.java | 2 +- .../warpdrive/block/movement/BlockLift.java | 22 ++++++--- .../block/movement/BlockShipController.java | 30 +++++++----- .../block/movement/BlockShipCore.java | 20 +++++--- .../block/movement/BlockTransporter.java | 20 +++++--- .../block/passive/BlockDecorative.java | 4 +- .../warpdrive/block/passive/BlockGas.java | 32 +++++++------ .../passive/BlockHighlyAdvancedMachine.java | 9 +++- .../warpdrive/block/passive/BlockIridium.java | 9 +++- .../block/passive/BlockTransportBeacon.java | 10 ++-- .../block/weapon/BlockLaserCamera.java | 11 ++++- .../block/weapon/BlockWeaponController.java | 15 ++++-- .../warpdrive/item/ItemAirCanisterFull.java | 6 +++ .../cr0s/warpdrive/item/ItemComponent.java | 15 ++++-- .../cr0s/warpdrive/item/ItemCrystalToken.java | 16 +++++-- .../item/ItemElectromagneticCell.java | 2 +- .../warpdrive/item/ItemForceFieldShape.java | 17 +++++-- .../warpdrive/item/ItemForceFieldUpgrade.java | 15 ++++-- .../item/ItemIC2reactorLaserFocus.java | 7 ++- .../cr0s/warpdrive/item/ItemTuningDriver.java | 6 +++ .../cr0s/warpdrive/item/ItemTuningFork.java | 9 +++- .../java/cr0s/warpdrive/item/ItemUpgrade.java | 10 +++- 52 files changed, 446 insertions(+), 197 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/BlockChunkLoader.java b/src/main/java/cr0s/warpdrive/block/BlockChunkLoader.java index 73ec0f93..5aec3819 100644 --- a/src/main/java/cr0s/warpdrive/block/BlockChunkLoader.java +++ b/src/main/java/cr0s/warpdrive/block/BlockChunkLoader.java @@ -6,7 +6,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockChunkLoader extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) IIcon iconBuffer; public BlockChunkLoader() { @@ -19,11 +24,13 @@ public class BlockChunkLoader extends BlockAbstractContainer { return new TileEntityChunkLoader(); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { - iconBuffer = par1IconRegister.registerIcon("warpdrive:chunkLoader"); + public void registerBlockIcons(IIconRegister iconRegister) { + iconBuffer = iconRegister.registerIcon("warpdrive:chunkLoader"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int damage) { return iconBuffer; diff --git a/src/main/java/cr0s/warpdrive/block/BlockLaser.java b/src/main/java/cr0s/warpdrive/block/BlockLaser.java index f08e225c..d7423947 100644 --- a/src/main/java/cr0s/warpdrive/block/BlockLaser.java +++ b/src/main/java/cr0s/warpdrive/block/BlockLaser.java @@ -12,7 +12,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockLaser extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_SIDE = 0; @@ -23,14 +28,16 @@ public class BlockLaser extends BlockAbstractContainer { setResistance(20.0F * 5 / 3); setBlockName("warpdrive.machines.Laser"); } - + + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[1]; // Solid textures - iconBuffer[ICON_SIDE] = par1IconRegister.registerIcon("warpdrive:laserSide"); + iconBuffer[ICON_SIDE] = iconRegister.registerIcon("warpdrive:laserSide"); } - + + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return iconBuffer[ICON_SIDE]; diff --git a/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java b/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java index d1a92ffc..e6afd30e 100644 --- a/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java +++ b/src/main/java/cr0s/warpdrive/block/BlockLaserMedium.java @@ -10,6 +10,9 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockLaserMedium extends BlockAbstractContainer { private IIcon[] iconBuffer; @@ -18,23 +21,25 @@ public class BlockLaserMedium extends BlockAbstractContainer { setBlockName("warpdrive.machines.LaserMedium"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[9]; - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:laserMediumSide0"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:laserMediumSide1"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:laserMediumSide2"); - iconBuffer[3] = par1IconRegister.registerIcon("warpdrive:laserMediumSide3"); - iconBuffer[4] = par1IconRegister.registerIcon("warpdrive:laserMediumSide4"); - iconBuffer[5] = par1IconRegister.registerIcon("warpdrive:laserMediumSide5"); - iconBuffer[6] = par1IconRegister.registerIcon("warpdrive:laserMediumSide6"); - iconBuffer[7] = par1IconRegister.registerIcon("warpdrive:laserMediumSide7"); - iconBuffer[8] = par1IconRegister.registerIcon("warpdrive:laserMediumTopBottom"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:laserMediumSide0"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:laserMediumSide1"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:laserMediumSide2"); + iconBuffer[3] = iconRegister.registerIcon("warpdrive:laserMediumSide3"); + iconBuffer[4] = iconRegister.registerIcon("warpdrive:laserMediumSide4"); + iconBuffer[5] = iconRegister.registerIcon("warpdrive:laserMediumSide5"); + iconBuffer[6] = iconRegister.registerIcon("warpdrive:laserMediumSide6"); + iconBuffer[7] = iconRegister.registerIcon("warpdrive:laserMediumSide7"); + iconBuffer[8] = iconRegister.registerIcon("warpdrive:laserMediumTopBottom"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { - int metadata = blockAccess.getBlockMetadata(x, y, z); + final int metadata = blockAccess.getBlockMetadata(x, y, z); if (side == 0 || side == 1) { return iconBuffer[8]; } @@ -42,6 +47,7 @@ public class BlockLaserMedium extends BlockAbstractContainer { return iconBuffer[Math.min(metadata, 7)]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0 || side == 1) { diff --git a/src/main/java/cr0s/warpdrive/block/atomic/BlockAcceleratorControlPoint.java b/src/main/java/cr0s/warpdrive/block/atomic/BlockAcceleratorControlPoint.java index 06632c50..2bd208b4 100644 --- a/src/main/java/cr0s/warpdrive/block/atomic/BlockAcceleratorControlPoint.java +++ b/src/main/java/cr0s/warpdrive/block/atomic/BlockAcceleratorControlPoint.java @@ -23,8 +23,8 @@ public class BlockAcceleratorControlPoint extends BlockAbstractAccelerator imple setBlockTextureName("warpdrive:atomic/accelerator_control_point"); } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[2]; @@ -32,8 +32,8 @@ public class BlockAcceleratorControlPoint extends BlockAbstractAccelerator imple icons[1] = iconRegister.registerIcon(getTextureName() + "-on"); } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(int side, int metadata) { return icons[metadata % 2]; } diff --git a/src/main/java/cr0s/warpdrive/block/atomic/BlockChiller.java b/src/main/java/cr0s/warpdrive/block/atomic/BlockChiller.java index 312632d8..39b93a63 100644 --- a/src/main/java/cr0s/warpdrive/block/atomic/BlockChiller.java +++ b/src/main/java/cr0s/warpdrive/block/atomic/BlockChiller.java @@ -30,8 +30,8 @@ public class BlockChiller extends BlockAbstractAccelerator { setBlockTextureName("warpdrive:atomic/chiller" + tier); } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[2]; @@ -39,8 +39,8 @@ public class BlockChiller extends BlockAbstractAccelerator { icons[1] = iconRegister.registerIcon(getTextureName() + "-on"); } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(int side, int metadata) { return icons[metadata % 2]; } diff --git a/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetGlass.java b/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetGlass.java index 349d4ad2..59893dc2 100644 --- a/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetGlass.java +++ b/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetGlass.java @@ -15,6 +15,7 @@ public class BlockElectromagnetGlass extends BlockElectromagnetPlain { setBlockTextureName("warpdrive:atomic/electromagnet"); } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { iconSide = iconRegister.registerIcon("warpdrive:atomic/electromagnet" + tier + "_glass-side"); diff --git a/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetPlain.java b/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetPlain.java index 91314f62..fbe2b2ed 100644 --- a/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetPlain.java +++ b/src/main/java/cr0s/warpdrive/block/atomic/BlockElectromagnetPlain.java @@ -3,9 +3,14 @@ package cr0s.warpdrive.block.atomic; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockElectromagnetPlain extends BlockAbstractAccelerator { + @SideOnly(Side.CLIENT) protected IIcon iconSide; + @SideOnly(Side.CLIENT) protected IIcon iconTop; public BlockElectromagnetPlain(final byte tier) { @@ -13,12 +18,14 @@ public class BlockElectromagnetPlain extends BlockAbstractAccelerator { setBlockName("warpdrive.atomic.electromagnet" + tier + ".plain"); } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { iconSide = iconRegister.registerIcon("warpdrive:atomic/electromagnet" + tier + "_plain-side"); iconTop = iconRegister.registerIcon("warpdrive:atomic/electromagnet" + tier + "_plain-top"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return side == 0 || side == 1 ? iconTop : iconSide; diff --git a/src/main/java/cr0s/warpdrive/block/atomic/BlockParticlesInjector.java b/src/main/java/cr0s/warpdrive/block/atomic/BlockParticlesInjector.java index 726f359b..b9651704 100644 --- a/src/main/java/cr0s/warpdrive/block/atomic/BlockParticlesInjector.java +++ b/src/main/java/cr0s/warpdrive/block/atomic/BlockParticlesInjector.java @@ -19,8 +19,8 @@ public class BlockParticlesInjector extends BlockAcceleratorControlPoint { setBlockTextureName("warpdrive:atomic/particles_injector"); } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[2]; @@ -28,8 +28,8 @@ public class BlockParticlesInjector extends BlockAcceleratorControlPoint { icons[1] = iconRegister.registerIcon(getTextureName() + "-on"); } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(int side, int metadata) { return icons[metadata % 2]; } diff --git a/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java b/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java index 73971c4a..4b4e68c0 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/BlockAbstractAir.java @@ -67,6 +67,7 @@ public abstract class BlockAbstractAir extends BlockAbstractBase { return 1; } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { if (WarpDriveConfig.BREATHING_AIR_BLOCK_DEBUG) { @@ -92,6 +93,7 @@ public abstract class BlockAbstractAir extends BlockAbstractBase { } } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (WarpDriveConfig.BREATHING_AIR_BLOCK_DEBUG) { diff --git a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java index 0e98f08a..0f6b631a 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGenerator.java @@ -18,7 +18,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockAirGenerator extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_INACTIVE_SIDE = 0; @@ -30,14 +35,16 @@ public class BlockAirGenerator extends BlockAbstractContainer { setBlockName("warpdrive.breathing.air_generator"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[3]; - iconBuffer[ICON_INACTIVE_SIDE] = par1IconRegister.registerIcon("warpdrive:breathing/air_generator-side_inactive"); - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:breathing/air_generator-connection"); - iconBuffer[ICON_SIDE_ACTIVATED] = par1IconRegister.registerIcon("warpdrive:breathing/air_generator-side_active"); + iconBuffer[ICON_INACTIVE_SIDE] = iconRegister.registerIcon("warpdrive:breathing/air_generator-side_inactive"); + iconBuffer[ICON_BOTTOM] = iconRegister.registerIcon("warpdrive:breathing/air_generator-connection"); + iconBuffer[ICON_SIDE_ACTIVATED] = iconRegister.registerIcon("warpdrive:breathing/air_generator-side_active"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { /* diff --git a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java index ea785b1b..892f6382 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/BlockAirGeneratorTiered.java @@ -40,14 +40,16 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer { setBlockName("warpdrive.breathing.air_generator" + tier); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[3]; - iconBuffer[ICON_INACTIVE_SIDE] = par1IconRegister.registerIcon("warpdrive:breathing/air_generator-side_inactive"); - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:breathing/air_generator-connection"); - iconBuffer[ICON_SIDE_ACTIVATED] = par1IconRegister.registerIcon("warpdrive:breathing/air_generator-side_active"); + iconBuffer[ICON_INACTIVE_SIDE] = iconRegister.registerIcon("warpdrive:breathing/air_generator-side_inactive"); + iconBuffer[ICON_BOTTOM] = iconRegister.registerIcon("warpdrive:breathing/air_generator-connection"); + iconBuffer[ICON_SIDE_ACTIVATED] = iconRegister.registerIcon("warpdrive:breathing/air_generator-side_active"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -62,6 +64,7 @@ public class BlockAirGeneratorTiered extends BlockAbstractContainer { return iconBuffer[ICON_BOTTOM]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 3) { diff --git a/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java b/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java index 87bad374..d779bd4b 100644 --- a/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java +++ b/src/main/java/cr0s/warpdrive/block/building/BlockShipScanner.java @@ -28,14 +28,16 @@ public class BlockShipScanner extends BlockAbstractContainer { setBlockName("warpdrive.building.ShipScanner"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[16]; - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:building/shipScannerBottom"); - iconBuffer[ICON_TOP ] = par1IconRegister.registerIcon("warpdrive:building/shipScannerTop"); - iconBuffer[ICON_SIDE ] = par1IconRegister.registerIcon("warpdrive:building/shipScannerSide"); + iconBuffer[ICON_BOTTOM] = iconRegister.registerIcon("warpdrive:building/shipScannerBottom"); + iconBuffer[ICON_TOP ] = iconRegister.registerIcon("warpdrive:building/shipScannerTop"); + iconBuffer[ICON_SIDE ] = iconRegister.registerIcon("warpdrive:building/shipScannerSide"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java b/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java index 884dbaa6..35ddc398 100644 --- a/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java +++ b/src/main/java/cr0s/warpdrive/block/collection/BlockLaserTreeFarm.java @@ -36,20 +36,22 @@ public class BlockLaserTreeFarm extends BlockAbstractContainer { setBlockName("warpdrive.collection.LaserTreeFarm"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[16]; - iconBuffer[ICON_IDLE ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_idle"); - iconBuffer[ICON_FARMING_LOW_POWER] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_farmingLowPower"); - iconBuffer[ICON_FARMING_POWERED] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_farmingPowered"); - iconBuffer[ICON_SCANNING_LOW_POWER] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_scanningLowPower"); - iconBuffer[ICON_SCANNING_POWERED] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_scanningPowered"); - iconBuffer[ICON_PLANTING_LOW_POWER] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_plantingLowPower"); - iconBuffer[ICON_PLANTING_POWERED] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_plantingPowered"); - iconBuffer[ICON_BOTTOM ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmBottom"); - iconBuffer[ICON_TOP ] = par1IconRegister.registerIcon("warpdrive:collection/laserTreeFarmTop"); + iconBuffer[ICON_IDLE ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_idle"); + iconBuffer[ICON_FARMING_LOW_POWER ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_farmingLowPower"); + iconBuffer[ICON_FARMING_POWERED ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_farmingPowered"); + iconBuffer[ICON_SCANNING_LOW_POWER] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_scanningLowPower"); + iconBuffer[ICON_SCANNING_POWERED ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_scanningPowered"); + iconBuffer[ICON_PLANTING_LOW_POWER] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_plantingLowPower"); + iconBuffer[ICON_PLANTING_POWERED ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmSide_plantingPowered"); + iconBuffer[ICON_BOTTOM ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmBottom"); + iconBuffer[ICON_TOP ] = iconRegister.registerIcon("warpdrive:collection/laserTreeFarmTop"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -65,6 +67,7 @@ public class BlockLaserTreeFarm extends BlockAbstractContainer { return null; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java b/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java index 27d7da98..c305e36f 100644 --- a/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java +++ b/src/main/java/cr0s/warpdrive/block/collection/BlockMiningLaser.java @@ -34,18 +34,20 @@ public class BlockMiningLaser extends BlockAbstractContainer { setBlockName("warpdrive.collection.MiningLaser"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[16]; - iconBuffer[ICON_IDLE ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_idle"); - iconBuffer[ICON_MINING_LOW_POWER] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_miningLowPower"); - iconBuffer[ICON_MINING_POWERED] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_miningPowered"); - iconBuffer[ICON_SCANNING_LOW_POWER] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_scanningLowPower"); - iconBuffer[ICON_SCANNING_POWERED] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserSide_scanningPowered"); - iconBuffer[ICON_BOTTOM ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserBottom"); - iconBuffer[ICON_TOP ] = par1IconRegister.registerIcon("warpdrive:collection/miningLaserTop"); + iconBuffer[ICON_IDLE ] = iconRegister.registerIcon("warpdrive:collection/miningLaserSide_idle"); + iconBuffer[ICON_MINING_LOW_POWER ] = iconRegister.registerIcon("warpdrive:collection/miningLaserSide_miningLowPower"); + iconBuffer[ICON_MINING_POWERED ] = iconRegister.registerIcon("warpdrive:collection/miningLaserSide_miningPowered"); + iconBuffer[ICON_SCANNING_LOW_POWER] = iconRegister.registerIcon("warpdrive:collection/miningLaserSide_scanningLowPower"); + iconBuffer[ICON_SCANNING_POWERED ] = iconRegister.registerIcon("warpdrive:collection/miningLaserSide_scanningPowered"); + iconBuffer[ICON_BOTTOM ] = iconRegister.registerIcon("warpdrive:collection/miningLaserBottom"); + iconBuffer[ICON_TOP ] = iconRegister.registerIcon("warpdrive:collection/miningLaserTop"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -61,6 +63,7 @@ public class BlockMiningLaser extends BlockAbstractContainer { return null; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java index d1b4d833..b43e6c43 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java @@ -13,7 +13,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockCamera extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_SIDE = 0; @@ -23,13 +28,15 @@ public class BlockCamera extends BlockAbstractContainer { setBlockName("warpdrive.detection.Camera"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[1]; // Solid textures - iconBuffer[ICON_SIDE] = par1IconRegister.registerIcon("warpdrive:detection/cameraSide"); + iconBuffer[ICON_SIDE] = iconRegister.registerIcon("warpdrive:detection/cameraSide"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return iconBuffer[ICON_SIDE]; diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCoil.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCoil.java index 6e6553fb..831c6b69 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCoil.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCoil.java @@ -10,9 +10,13 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.util.IIcon; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; public class BlockCloakingCoil extends Block { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; public BlockCloakingCoil() { @@ -24,21 +28,23 @@ public class BlockCloakingCoil extends Block { } static final boolean oldTextures = true; + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[4]; if (oldTextures) { - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilSide"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilSideActive"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilTop"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilSide"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilSideActive"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilTop"); } else { - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilInPassive"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilOutPassive"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilInActive"); - iconBuffer[3] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoilOutActive"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilInPassive"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilOutPassive"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilInActive"); + iconBuffer[3] = iconRegister.registerIcon("warpdrive:detection/cloakingCoilOutActive"); } } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { // Metadata values diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java index 47081fdd..5a8e4038 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java @@ -17,7 +17,12 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockCloakingCore extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; public BlockCloakingCore() { @@ -25,13 +30,15 @@ public class BlockCloakingCore extends BlockAbstractContainer { setBlockName("warpdrive.detection.CloakingCore"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[2]; - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoreInactive"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoreActive"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:detection/cloakingCoreInactive"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:detection/cloakingCoreActive"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -42,6 +49,7 @@ public class BlockCloakingCore extends BlockAbstractContainer { return null; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return iconBuffer[1]; diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockMonitor.java b/src/main/java/cr0s/warpdrive/block/detection/BlockMonitor.java index 497cd636..c868e586 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockMonitor.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockMonitor.java @@ -15,8 +15,14 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockMonitor extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon iconFront; + @SideOnly(Side.CLIENT) private IIcon iconSide; public BlockMonitor() { @@ -25,18 +31,21 @@ public class BlockMonitor extends BlockAbstractContainer { setBlockName("warpdrive.detection.Monitor"); } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { iconFront = iconRegister.registerIcon("warpdrive:detection/monitorFront"); iconSide = iconRegister.registerIcon("warpdrive:detection/monitorSide"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { int metadata = blockAccess.getBlockMetadata(x, y, z); return side == metadata ? iconFront : iconSide; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return side == 3 ? iconFront : iconSide; diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java b/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java index 0544bf13..e84d8be3 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockRadar.java @@ -15,7 +15,12 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockRadar extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_SIDE_INACTIVE = 0; @@ -29,16 +34,18 @@ public class BlockRadar extends BlockAbstractContainer { setBlockName("warpdrive.detection.Radar"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[16]; - iconBuffer[ICON_SIDE_INACTIVE] = par1IconRegister.registerIcon("warpdrive:detection/radarSideInactive"); - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:detection/radarBottom"); - iconBuffer[ICON_TOP] = par1IconRegister.registerIcon("warpdrive:detection/radarTop"); - iconBuffer[ICON_SIDE_ACTIVATED] = par1IconRegister.registerIcon("warpdrive:detection/radarSideActive"); - iconBuffer[ICON_SIDE_ACTIVATED_SCAN] = par1IconRegister.registerIcon("warpdrive:detection/radarSideActiveScan"); + iconBuffer[ICON_SIDE_INACTIVE ] = iconRegister.registerIcon("warpdrive:detection/radarSideInactive"); + iconBuffer[ICON_BOTTOM ] = iconRegister.registerIcon("warpdrive:detection/radarBottom"); + iconBuffer[ICON_TOP ] = iconRegister.registerIcon("warpdrive:detection/radarTop"); + iconBuffer[ICON_SIDE_ACTIVATED ] = iconRegister.registerIcon("warpdrive:detection/radarSideActive"); + iconBuffer[ICON_SIDE_ACTIVATED_SCAN] = iconRegister.registerIcon("warpdrive:detection/radarSideActiveScan"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -59,6 +66,7 @@ public class BlockRadar extends BlockAbstractContainer { return iconBuffer[ICON_SIDE_INACTIVE]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockSiren.java b/src/main/java/cr0s/warpdrive/block/detection/BlockSiren.java index a526257c..09420e5a 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockSiren.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockSiren.java @@ -40,8 +40,8 @@ public class BlockSiren extends BlockAbstractContainer { setBlockName("warpdrive.detection.Siren"); } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[4]; // Solid textures @@ -51,6 +51,7 @@ public class BlockSiren extends BlockAbstractContainer { iconBuffer[ICON_RAID_SUPERIOR] = iconRegister.registerIcon("warpdrive:detection/siren_raid_superior"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (!getIsRaid(metadata)) { diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java b/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java index afa58645..2fb16ea7 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockWarpIsolation.java @@ -10,7 +10,12 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.util.IIcon; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockWarpIsolation extends Block { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; public BlockWarpIsolation() { @@ -20,13 +25,15 @@ public class BlockWarpIsolation extends Block { setCreativeTab(WarpDrive.creativeTabWarpDrive); setBlockName("warpdrive.detection.WarpIsolation"); } - + + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[1]; - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:detection/warpIsolation"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:detection/warpIsolation"); } - + + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return iconBuffer[0]; diff --git a/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorCore.java b/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorCore.java index 6eff75dc..490ba205 100644 --- a/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorCore.java +++ b/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorCore.java @@ -11,8 +11,13 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockEnanReactorCore extends BlockAbstractContainer { - IIcon[] iconBuffer = new IIcon[17]; + + @SideOnly(Side.CLIENT) + IIcon[] iconBuffer; public BlockEnanReactorCore() { super(Material.iron); @@ -38,6 +43,7 @@ public class BlockEnanReactorCore extends BlockAbstractContainer { } } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -50,6 +56,7 @@ public class BlockEnanReactorCore extends BlockAbstractContainer { return iconBuffer[0]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0 || side == 1) { @@ -58,25 +65,27 @@ public class BlockEnanReactorCore extends BlockAbstractContainer { return iconBuffer[7]; } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { - iconBuffer[16] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreTopBottom"); - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide00"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide01"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide02"); - iconBuffer[3] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide03"); - iconBuffer[4] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide10"); - iconBuffer[5] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide11"); - iconBuffer[6] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide12"); - iconBuffer[7] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide13"); - iconBuffer[8] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide20"); - iconBuffer[9] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide21"); - iconBuffer[10] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide22"); - iconBuffer[11] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide23"); - iconBuffer[12] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide30"); - iconBuffer[13] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide31"); - iconBuffer[14] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide32"); - iconBuffer[15] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide33"); + public void registerBlockIcons(IIconRegister iconRegister) { + iconBuffer = new IIcon[17]; + iconBuffer[16] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreTopBottom"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide00"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide01"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide02"); + iconBuffer[3] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide03"); + iconBuffer[4] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide10"); + iconBuffer[5] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide11"); + iconBuffer[6] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide12"); + iconBuffer[7] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide13"); + iconBuffer[8] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide20"); + iconBuffer[9] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide21"); + iconBuffer[10] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide22"); + iconBuffer[11] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide23"); + iconBuffer[12] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide30"); + iconBuffer[13] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide31"); + iconBuffer[14] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide32"); + iconBuffer[15] = iconRegister.registerIcon("warpdrive:energy/enanReactorCoreSide33"); } @Override diff --git a/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorLaser.java b/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorLaser.java index 09f0baf4..3cd5a26b 100644 --- a/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorLaser.java +++ b/src/main/java/cr0s/warpdrive/block/energy/BlockEnanReactorLaser.java @@ -10,8 +10,13 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockEnanReactorLaser extends BlockAbstractContainer { - static IIcon[] iconBuffer = new IIcon[16]; + + @SideOnly(Side.CLIENT) + static IIcon[] iconBuffer; public BlockEnanReactorLaser() { super(Material.iron); @@ -43,6 +48,7 @@ public class BlockEnanReactorLaser extends BlockAbstractContainer { return false; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -57,6 +63,7 @@ public class BlockEnanReactorLaser extends BlockAbstractContainer { return iconBuffer[1]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0 || side == 1) { @@ -70,11 +77,13 @@ public class BlockEnanReactorLaser extends BlockAbstractContainer { return iconBuffer[1]; } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorLaserTopBottom"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorLaserSides"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:energy/enanReactorLaserActive"); + public void registerBlockIcons(IIconRegister iconRegister) { + iconBuffer = new IIcon[3]; + iconBuffer[0] = iconRegister.registerIcon("warpdrive:energy/enanReactorLaserTopBottom"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:energy/enanReactorLaserSides"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:energy/enanReactorLaserActive"); } @Override diff --git a/src/main/java/cr0s/warpdrive/block/energy/BlockEnergyBank.java b/src/main/java/cr0s/warpdrive/block/energy/BlockEnergyBank.java index a8bbdcff..33ed173a 100644 --- a/src/main/java/cr0s/warpdrive/block/energy/BlockEnergyBank.java +++ b/src/main/java/cr0s/warpdrive/block/energy/BlockEnergyBank.java @@ -28,6 +28,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockEnergyBank extends BlockAbstractContainer { + @SideOnly(Side.CLIENT) private IIcon[] icons; @@ -64,6 +65,7 @@ public class BlockEnergyBank extends BlockAbstractContainer { } } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[12]; @@ -81,6 +83,7 @@ public class BlockEnergyBank extends BlockAbstractContainer { icons[11] = iconRegister.registerIcon("warpdrive:energy/energyBankSuperiorOutput"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final TileEntity tileEntity = blockAccess.getTileEntity(x, y, z); @@ -91,6 +94,7 @@ public class BlockEnergyBank extends BlockAbstractContainer { return icons[3 * ((TileEntityEnergyBank) tileEntity).getTier() + ((TileEntityEnergyBank) tileEntity).getMode(EnumFacing.getFront(side))]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return icons[(metadata * 3 + (side == 1 ? 1 : 2)) % icons.length]; diff --git a/src/main/java/cr0s/warpdrive/block/energy/BlockIC2reactorLaserMonitor.java b/src/main/java/cr0s/warpdrive/block/energy/BlockIC2reactorLaserMonitor.java index 655a01c5..de2632fe 100644 --- a/src/main/java/cr0s/warpdrive/block/energy/BlockIC2reactorLaserMonitor.java +++ b/src/main/java/cr0s/warpdrive/block/energy/BlockIC2reactorLaserMonitor.java @@ -11,6 +11,9 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockIC2reactorLaserMonitor extends BlockAbstractContainer { static IIcon[] icons; @@ -24,14 +27,16 @@ public class BlockIC2reactorLaserMonitor extends BlockAbstractContainer { return new TileEntityIC2reactorLaserMonitor(); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[3]; - icons[0] = par1IconRegister.registerIcon("warpdrive:energy/IC2reactorLaserMonitorNotConnected"); - icons[1] = par1IconRegister.registerIcon("warpdrive:energy/IC2reactorLaserMonitorConnectedNotPowered"); - icons[2] = par1IconRegister.registerIcon("warpdrive:energy/IC2reactorLaserMonitorConnectedPowered"); + icons[0] = iconRegister.registerIcon("warpdrive:energy/IC2reactorLaserMonitorNotConnected"); + icons[1] = iconRegister.registerIcon("warpdrive:energy/IC2reactorLaserMonitorConnectedNotPowered"); + icons[2] = iconRegister.registerIcon("warpdrive:energy/IC2reactorLaserMonitorConnectedPowered"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -51,6 +56,7 @@ public class BlockIC2reactorLaserMonitor extends BlockAbstractContainer { return icons[0]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 4) { diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java index be3182ef..b46b501e 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java @@ -39,8 +39,10 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; public class BlockForceField extends BlockAbstractForceField implements IDamageReceiver { + @SideOnly(Side.CLIENT) private IIcon[] icons; + private static final float BOUNDING_TOLERANCE = 0.05F; public BlockForceField(final byte tier) { @@ -60,8 +62,8 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR return null; } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(int side, int metadata) { return icons[metadata % 16]; } @@ -91,8 +93,8 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR /**/ } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[16]; diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java index 52e4c51b..ba4b819b 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java @@ -27,6 +27,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; public class BlockForceFieldProjector extends BlockAbstractForceField { + @SideOnly(Side.CLIENT) private IIcon[] icons; @@ -37,6 +38,7 @@ public class BlockForceFieldProjector extends BlockAbstractForceField { setBlockTextureName("warpdrive:forcefield/projector"); } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[11]; @@ -53,6 +55,7 @@ public class BlockForceFieldProjector extends BlockAbstractForceField { icons[10] = iconRegister.registerIcon("warpdrive:forcefield/projectorShape_tunnel"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -74,6 +77,7 @@ public class BlockForceFieldProjector extends BlockAbstractForceField { return icons[0]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return side == 3 ? icons[4] : icons[2]; diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldRelay.java b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldRelay.java index 4f7b53a0..5a3b14c8 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldRelay.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldRelay.java @@ -19,6 +19,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockForceFieldRelay extends BlockAbstractForceField { + @SideOnly(Side.CLIENT) private IIcon[] icons; @@ -29,6 +30,7 @@ public class BlockForceFieldRelay extends BlockAbstractForceField { setBlockTextureName("warpdrive:forcefield/relay"); } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[EnumForceFieldUpgrade.length + 1]; @@ -43,6 +45,7 @@ public class BlockForceFieldRelay extends BlockAbstractForceField { icons[EnumForceFieldUpgrade.length] = iconRegister.registerIcon("warpdrive:forcefield/relay_top"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final TileEntity tileEntity = blockAccess.getTileEntity(x, y, z); @@ -56,6 +59,7 @@ public class BlockForceFieldRelay extends BlockAbstractForceField { return icons[((TileEntityForceFieldRelay)tileEntity).getUpgrade().ordinal()]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int damage) { if (side == 0 || side == 1) { diff --git a/src/main/java/cr0s/warpdrive/block/hull/BlockHullOmnipanel.java b/src/main/java/cr0s/warpdrive/block/hull/BlockHullOmnipanel.java index 7937fd3d..dc6b869b 100644 --- a/src/main/java/cr0s/warpdrive/block/hull/BlockHullOmnipanel.java +++ b/src/main/java/cr0s/warpdrive/block/hull/BlockHullOmnipanel.java @@ -46,8 +46,8 @@ public class BlockHullOmnipanel extends BlockAbstractOmnipanel implements IDamag return 2; } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(final int side, final int metadata) { return icons[metadata % 16]; } @@ -69,8 +69,8 @@ public class BlockHullOmnipanel extends BlockAbstractOmnipanel implements IDamag } } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[16]; diff --git a/src/main/java/cr0s/warpdrive/block/hull/BlockHullPlain.java b/src/main/java/cr0s/warpdrive/block/hull/BlockHullPlain.java index 52ca0be7..daa743ba 100644 --- a/src/main/java/cr0s/warpdrive/block/hull/BlockHullPlain.java +++ b/src/main/java/cr0s/warpdrive/block/hull/BlockHullPlain.java @@ -47,8 +47,8 @@ public class BlockHullPlain extends BlockAbstractBase implements IDamageReceiver return 2; } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(int side, int metadata) { return icons[metadata % 16]; } @@ -62,16 +62,16 @@ public class BlockHullPlain extends BlockAbstractBase implements IDamageReceiver return ItemDye.field_150921_b[~metadata & 15]; } - @Override @SideOnly(Side.CLIENT) + @Override public void getSubBlocks(Item item, CreativeTabs creativeTab, List list) { for (int i = 0; i < 16; ++i) { list.add(new ItemStack(item, 1, i)); } } - @Override @SideOnly(Side.CLIENT) + @Override public void registerBlockIcons(IIconRegister iconRegister) { icons = new IIcon[16]; diff --git a/src/main/java/cr0s/warpdrive/block/hull/BlockHullSlab.java b/src/main/java/cr0s/warpdrive/block/hull/BlockHullSlab.java index 577be6f3..da42f625 100644 --- a/src/main/java/cr0s/warpdrive/block/hull/BlockHullSlab.java +++ b/src/main/java/cr0s/warpdrive/block/hull/BlockHullSlab.java @@ -87,8 +87,8 @@ public class BlockHullSlab extends BlockSlab implements IBlockBase, IDamageRecei return super.getRenderColor(metadata); } - @Override @SideOnly(Side.CLIENT) + @Override public IIcon getIcon(final int side, final int metadata) { // plain slab => same texture all around if (metadata < 6) { diff --git a/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java b/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java index 69a16bf8..67ad5528 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java +++ b/src/main/java/cr0s/warpdrive/block/movement/BlockLift.java @@ -14,7 +14,12 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockLift extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; public BlockLift() { @@ -22,17 +27,19 @@ public class BlockLift extends BlockAbstractContainer { setBlockName("warpdrive.movement.Lift"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[6]; - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:movement/liftSideOffline"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:movement/liftSideUp"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:movement/liftSideDown"); - iconBuffer[3] = par1IconRegister.registerIcon("warpdrive:movement/liftUpInactive"); - iconBuffer[4] = par1IconRegister.registerIcon("warpdrive:movement/liftUpOut"); - iconBuffer[5] = par1IconRegister.registerIcon("warpdrive:movement/liftUpIn"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:movement/liftSideOffline"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:movement/liftSideUp"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:movement/liftSideDown"); + iconBuffer[3] = iconRegister.registerIcon("warpdrive:movement/liftUpInactive"); + iconBuffer[4] = iconRegister.registerIcon("warpdrive:movement/liftUpOut"); + iconBuffer[5] = iconRegister.registerIcon("warpdrive:movement/liftUpIn"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -52,6 +59,7 @@ public class BlockLift extends BlockAbstractContainer { return iconBuffer[metadata]; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (metadata > 2) { diff --git a/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java b/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java index cb2a9eba..fd2f834e 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java +++ b/src/main/java/cr0s/warpdrive/block/movement/BlockShipController.java @@ -18,6 +18,8 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockShipController extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_INACTIVE_SIDE = 0; @@ -30,25 +32,26 @@ public class BlockShipController extends BlockAbstractContainer { setBlockName("warpdrive.movement.ShipController"); } - @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister par1IconRegister) { + @Override + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[11]; // Solid textures - iconBuffer[ICON_INACTIVE_SIDE] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideInactive"); - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerBottom"); - iconBuffer[ICON_TOP] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerTop"); + iconBuffer[ICON_INACTIVE_SIDE] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideInactive"); + iconBuffer[ICON_BOTTOM ] = iconRegister.registerIcon("warpdrive:movement/shipControllerBottom"); + iconBuffer[ICON_TOP ] = iconRegister.registerIcon("warpdrive:movement/shipControllerTop"); // Animated textures - iconBuffer[ICON_SIDE_ACTIVATED ] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive0"); - iconBuffer[ICON_SIDE_ACTIVATED + 1] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive1"); - iconBuffer[ICON_SIDE_ACTIVATED + 2] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive2"); - iconBuffer[ICON_SIDE_ACTIVATED + 3] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive3"); - iconBuffer[ICON_SIDE_ACTIVATED + 4] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive4"); - iconBuffer[ICON_SIDE_ACTIVATED + 5] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive5"); - iconBuffer[ICON_SIDE_ACTIVATED + 6] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive6"); - iconBuffer[ICON_SIDE_ACTIVATED + 7] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerSideActive7"); + iconBuffer[ICON_SIDE_ACTIVATED ] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive0"); + iconBuffer[ICON_SIDE_ACTIVATED + 1] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive1"); + iconBuffer[ICON_SIDE_ACTIVATED + 2] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive2"); + iconBuffer[ICON_SIDE_ACTIVATED + 3] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive3"); + iconBuffer[ICON_SIDE_ACTIVATED + 4] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive4"); + iconBuffer[ICON_SIDE_ACTIVATED + 5] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive5"); + iconBuffer[ICON_SIDE_ACTIVATED + 6] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive6"); + iconBuffer[ICON_SIDE_ACTIVATED + 7] = iconRegister.registerIcon("warpdrive:movement/shipControllerSideActive7"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -69,6 +72,7 @@ public class BlockShipController extends BlockAbstractContainer { return null; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/block/movement/BlockShipCore.java b/src/main/java/cr0s/warpdrive/block/movement/BlockShipCore.java index ede8a0de..79588bf9 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/BlockShipCore.java +++ b/src/main/java/cr0s/warpdrive/block/movement/BlockShipCore.java @@ -18,7 +18,12 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockShipCore extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_BOTTOM = 1; @@ -32,16 +37,18 @@ public class BlockShipCore extends BlockAbstractContainer { setBlockName("warpdrive.movement.ShipCore"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[5]; - iconBuffer[ICON_SIDE_INACTIVE] = par1IconRegister.registerIcon("warpdrive:movement/shipCoreSideInactive"); - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:movement/shipCoreBottom"); - iconBuffer[ICON_TOP] = par1IconRegister.registerIcon("warpdrive:movement/shipCoreTop"); - iconBuffer[ICON_SIDE_ACTIVATED] = par1IconRegister.registerIcon("warpdrive:movement/shipCoreSideActive"); - iconBuffer[ICON_SIDE_HEATED] = par1IconRegister.registerIcon("warpdrive:movement/shipCoreSideHeated"); + iconBuffer[ICON_SIDE_INACTIVE ] = iconRegister.registerIcon("warpdrive:movement/shipCoreSideInactive"); + iconBuffer[ICON_BOTTOM ] = iconRegister.registerIcon("warpdrive:movement/shipCoreBottom"); + iconBuffer[ICON_TOP ] = iconRegister.registerIcon("warpdrive:movement/shipCoreTop"); + iconBuffer[ICON_SIDE_ACTIVATED] = iconRegister.registerIcon("warpdrive:movement/shipCoreSideActive"); + iconBuffer[ICON_SIDE_HEATED ] = iconRegister.registerIcon("warpdrive:movement/shipCoreSideHeated"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { final int metadata = blockAccess.getBlockMetadata(x, y, z); @@ -62,6 +69,7 @@ public class BlockShipCore extends BlockAbstractContainer { return null; } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/block/movement/BlockTransporter.java b/src/main/java/cr0s/warpdrive/block/movement/BlockTransporter.java index cdeb1da7..39dd3315 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/BlockTransporter.java +++ b/src/main/java/cr0s/warpdrive/block/movement/BlockTransporter.java @@ -10,8 +10,12 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; -public class BlockTransporter extends BlockAbstractContainer { +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +public class BlockTransporter extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; public BlockTransporter() { @@ -23,16 +27,18 @@ public class BlockTransporter extends BlockAbstractContainer { public TileEntity createNewTileEntity(World world, int i) { return new TileEntityTransporter(); } - + + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[3]; // Solid textures - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:movement/transporterBottom"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:movement/transporterTop"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:movement/transporterSide"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:movement/transporterBottom"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:movement/transporterTop"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:movement/transporterSide"); } - + + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0 || side == 1) { diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockDecorative.java b/src/main/java/cr0s/warpdrive/block/passive/BlockDecorative.java index d0394edb..b0c58aeb 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockDecorative.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockDecorative.java @@ -30,7 +30,6 @@ public class BlockDecorative extends Block { setBlockName("warpdrive.decoration.decorative.plain"); setCreativeTab(WarpDrive.creativeTabWarpDrive); - icons = new IIcon[EnumDecorativeType.length]; itemStackCache = new ItemStack[EnumDecorativeType.length]; } @@ -41,13 +40,16 @@ public class BlockDecorative extends Block { } } + @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister iconRegister) { + icons = new IIcon[EnumDecorativeType.length]; for (EnumDecorativeType enumDecorativeType : EnumDecorativeType.values()) { icons[enumDecorativeType.ordinal()] = iconRegister.registerIcon("warpdrive:decoration/decorative-" + enumDecorativeType.unlocalizedName); } } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int damage) { if (damage >= 0 && damage < EnumDecorativeType.length) { diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java b/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java index cbfad78f..fbb63fe3 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockGas.java @@ -73,24 +73,26 @@ public class BlockGas extends Block { public int getRenderBlockPass() { return 1; // transparency enabled } - + + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[12]; - iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:decoration/gas-blue"); - iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:decoration/gas-red"); - iconBuffer[2] = par1IconRegister.registerIcon("warpdrive:decoration/gas-green"); - iconBuffer[3] = par1IconRegister.registerIcon("warpdrive:decoration/gas-yellow"); - iconBuffer[4] = par1IconRegister.registerIcon("warpdrive:decoration/gas-dark"); - iconBuffer[5] = par1IconRegister.registerIcon("warpdrive:decoration/gas-darkness"); - iconBuffer[6] = par1IconRegister.registerIcon("warpdrive:decoration/gas-white"); - iconBuffer[7] = par1IconRegister.registerIcon("warpdrive:decoration/gas-milk"); - iconBuffer[8] = par1IconRegister.registerIcon("warpdrive:decoration/gas-orange"); - iconBuffer[9] = par1IconRegister.registerIcon("warpdrive:decoration/gas-siren"); - iconBuffer[10] = par1IconRegister.registerIcon("warpdrive:decoration/gas-gray"); - iconBuffer[11] = par1IconRegister.registerIcon("warpdrive:decoration/gas-violet"); + iconBuffer[0] = iconRegister.registerIcon("warpdrive:decoration/gas-blue"); + iconBuffer[1] = iconRegister.registerIcon("warpdrive:decoration/gas-red"); + iconBuffer[2] = iconRegister.registerIcon("warpdrive:decoration/gas-green"); + iconBuffer[3] = iconRegister.registerIcon("warpdrive:decoration/gas-yellow"); + iconBuffer[4] = iconRegister.registerIcon("warpdrive:decoration/gas-dark"); + iconBuffer[5] = iconRegister.registerIcon("warpdrive:decoration/gas-darkness"); + iconBuffer[6] = iconRegister.registerIcon("warpdrive:decoration/gas-white"); + iconBuffer[7] = iconRegister.registerIcon("warpdrive:decoration/gas-milk"); + iconBuffer[8] = iconRegister.registerIcon("warpdrive:decoration/gas-orange"); + iconBuffer[9] = iconRegister.registerIcon("warpdrive:decoration/gas-siren"); + iconBuffer[10] = iconRegister.registerIcon("warpdrive:decoration/gas-gray"); + iconBuffer[11] = iconRegister.registerIcon("warpdrive:decoration/gas-violet"); } - + + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return iconBuffer[metadata % iconBuffer.length]; diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java b/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java index a89b6a9f..2be7d673 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockHighlyAdvancedMachine.java @@ -9,7 +9,11 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockHighlyAdvancedMachine extends Block { + public BlockHighlyAdvancedMachine() { super(Material.iron); setHardness(5.0F); @@ -18,9 +22,10 @@ public class BlockHighlyAdvancedMachine extends Block { setBlockName("warpdrive.passive.HighlyAdvancedMachine"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { - blockIcon = par1IconRegister.registerIcon("warpdrive:passive/highlyAdvancedMachineSide"); + public void registerBlockIcons(IIconRegister iconRegister) { + blockIcon = iconRegister.registerIcon("warpdrive:passive/highlyAdvancedMachineSide"); } @Override diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java b/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java index 56219526..f3cff424 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockIridium.java @@ -9,7 +9,11 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockIridium extends Block { + public BlockIridium() { super(Material.iron); setHardness(3.4F); @@ -19,9 +23,10 @@ public class BlockIridium extends Block { setBlockName("warpdrive.passive.IridiumBlock"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { - blockIcon = par1IconRegister.registerIcon("warpdrive:passive/iridiumSide"); + public void registerBlockIcons(IIconRegister iconRegister) { + blockIcon = iconRegister.registerIcon("warpdrive:passive/iridiumSide"); } @Override diff --git a/src/main/java/cr0s/warpdrive/block/passive/BlockTransportBeacon.java b/src/main/java/cr0s/warpdrive/block/passive/BlockTransportBeacon.java index d4742d3e..c489cb86 100644 --- a/src/main/java/cr0s/warpdrive/block/passive/BlockTransportBeacon.java +++ b/src/main/java/cr0s/warpdrive/block/passive/BlockTransportBeacon.java @@ -10,6 +10,9 @@ import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockTransportBeacon extends Block { public BlockTransportBeacon() { super(Material.iron); @@ -23,10 +26,11 @@ public class BlockTransportBeacon extends Block { public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } - + + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { - blockIcon = par1IconRegister.registerIcon("warpdrive:passive/transportBeacon"); + public void registerBlockIcons(IIconRegister iconRegister) { + blockIcon = iconRegister.registerIcon("warpdrive:passive/transportBeacon"); } @Override diff --git a/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java b/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java index 6c4a8225..f5bdd38d 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java @@ -16,7 +16,12 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockLaserCamera extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_SIDE = 0; @@ -28,13 +33,15 @@ public class BlockLaserCamera extends BlockAbstractContainer { setBlockName("warpdrive.weapon.LaserCamera"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[1]; // Solid textures - iconBuffer[ICON_SIDE] = par1IconRegister.registerIcon("warpdrive:weapon/laserCameraSide"); + iconBuffer[ICON_SIDE] = iconRegister.registerIcon("warpdrive:weapon/laserCameraSide"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { return iconBuffer[ICON_SIDE]; diff --git a/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java b/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java index 01fc0e20..767e6cac 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/BlockWeaponController.java @@ -15,7 +15,12 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class BlockWeaponController extends BlockAbstractContainer { + + @SideOnly(Side.CLIENT) private IIcon[] iconBuffer; private static final int ICON_TOP = 0; @@ -29,14 +34,16 @@ public class BlockWeaponController extends BlockAbstractContainer { setBlockName("warpdrive.weapon.WeaponController"); } + @SideOnly(Side.CLIENT) @Override - public void registerBlockIcons(IIconRegister par1IconRegister) { + public void registerBlockIcons(IIconRegister iconRegister) { iconBuffer = new IIcon[3]; - iconBuffer[ICON_TOP] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerTop"); - iconBuffer[ICON_BOTTOM] = par1IconRegister.registerIcon("warpdrive:movement/shipControllerBottom"); - iconBuffer[ICON_SIDE] = par1IconRegister.registerIcon("warpdrive:weapon/weaponControllerSide"); + iconBuffer[ICON_TOP] = iconRegister.registerIcon("warpdrive:movement/shipControllerTop"); + iconBuffer[ICON_BOTTOM] = iconRegister.registerIcon("warpdrive:movement/shipControllerBottom"); + iconBuffer[ICON_SIDE] = iconRegister.registerIcon("warpdrive:weapon/weaponControllerSide"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata) { if (side == 0) { diff --git a/src/main/java/cr0s/warpdrive/item/ItemAirCanisterFull.java b/src/main/java/cr0s/warpdrive/item/ItemAirCanisterFull.java index f12858dc..c1e8a292 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemAirCanisterFull.java +++ b/src/main/java/cr0s/warpdrive/item/ItemAirCanisterFull.java @@ -9,8 +9,12 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemAirCanisterFull extends Item implements IAirContainerItem { + @SideOnly(Side.CLIENT) private IIcon icon; public ItemAirCanisterFull() { @@ -21,11 +25,13 @@ public class ItemAirCanisterFull extends Item implements IAirContainerItem { setUnlocalizedName("warpdrive.armor.AirCanisterFull"); } + @SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister iconRegister) { icon = iconRegister.registerIcon("warpdrive:AirCanisterFull"); } + @SideOnly(Side.CLIENT) @Override public IIcon getIconFromDamage(int damage) { return icon; diff --git a/src/main/java/cr0s/warpdrive/item/ItemComponent.java b/src/main/java/cr0s/warpdrive/item/ItemComponent.java index c21c1992..03d8bd61 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemComponent.java +++ b/src/main/java/cr0s/warpdrive/item/ItemComponent.java @@ -18,8 +18,14 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -public class ItemComponent extends Item implements IAirContainerItem { +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemComponent extends Item implements IAirContainerItem { + + @SideOnly(Side.CLIENT) private IIcon[] icons; + private static ItemStack[] itemStackCache; public ItemComponent() { @@ -28,7 +34,6 @@ public class ItemComponent extends Item implements IAirContainerItem { setUnlocalizedName("warpdrive.crafting.component"); setCreativeTab(WarpDrive.creativeTabWarpDrive); - icons = new IIcon[EnumComponentType.length]; itemStackCache = new ItemStack[EnumComponentType.length]; } @@ -47,10 +52,12 @@ public class ItemComponent extends Item implements IAirContainerItem { return new ItemStack(WarpDrive.itemComponent, amount, enumComponentType.ordinal()); } + @SideOnly(Side.CLIENT) @Override - public void registerIcons(IIconRegister par1IconRegister) { + public void registerIcons(IIconRegister iconRegister) { + icons = new IIcon[EnumComponentType.length]; for(EnumComponentType enumComponentType : EnumComponentType.values()) { - icons[enumComponentType.ordinal()] = par1IconRegister.registerIcon("warpdrive:component/" + enumComponentType.unlocalizedName); + icons[enumComponentType.ordinal()] = iconRegister.registerIcon("warpdrive:component/" + enumComponentType.unlocalizedName); } } diff --git a/src/main/java/cr0s/warpdrive/item/ItemCrystalToken.java b/src/main/java/cr0s/warpdrive/item/ItemCrystalToken.java index fcf1d77c..e41262cc 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemCrystalToken.java +++ b/src/main/java/cr0s/warpdrive/item/ItemCrystalToken.java @@ -14,8 +14,14 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemCrystalToken extends Item { - private final IIcon[] icons; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + private static ItemStack[] itemStackCache; private static final int COUNT = 6; @@ -25,7 +31,6 @@ public class ItemCrystalToken extends Item { setUnlocalizedName("warpdrive.tool.crystalToken"); setCreativeTab(WarpDrive.creativeTabWarpDrive); - icons = new IIcon[COUNT]; itemStackCache = new ItemStack[COUNT]; } @@ -46,10 +51,12 @@ public class ItemCrystalToken extends Item { return new ItemStack(WarpDrive.itemCrystalToken, amount, 0); } + @SideOnly(Side.CLIENT) @Override - public void registerIcons(IIconRegister par1IconRegister) { + public void registerIcons(IIconRegister iconRegister) { + icons = new IIcon[COUNT]; for(int damage = 0; damage < COUNT; damage++) { - icons[damage] = par1IconRegister.registerIcon("warpdrive:tool/crystal_token-" + damage); + icons[damage] = iconRegister.registerIcon("warpdrive:tool/crystal_token-" + damage); } } @@ -62,6 +69,7 @@ public class ItemCrystalToken extends Item { return getUnlocalizedName(); } + @SideOnly(Side.CLIENT) @Override public IIcon getIconFromDamage(final int damage) { if (damage >= 0 && damage < COUNT) { diff --git a/src/main/java/cr0s/warpdrive/item/ItemElectromagneticCell.java b/src/main/java/cr0s/warpdrive/item/ItemElectromagneticCell.java index 6c86a28b..444de6ec 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemElectromagneticCell.java +++ b/src/main/java/cr0s/warpdrive/item/ItemElectromagneticCell.java @@ -38,8 +38,8 @@ public class ItemElectromagneticCell extends Item implements IParticleContainerI setHasSubtypes(true); } - @Override @SideOnly(Side.CLIENT) + @Override public void registerIcons(IIconRegister iconRegister) { icons = new IIcon[31]; icons[ 0] = iconRegister.registerIcon("warpdrive:atomic/electromagnetic_cell-empty"); diff --git a/src/main/java/cr0s/warpdrive/item/ItemForceFieldShape.java b/src/main/java/cr0s/warpdrive/item/ItemForceFieldShape.java index 4c662a06..7704791a 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemForceFieldShape.java +++ b/src/main/java/cr0s/warpdrive/item/ItemForceFieldShape.java @@ -18,8 +18,14 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; -public class ItemForceFieldShape extends Item { - private final IIcon[] icons; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ItemForceFieldShape extends Item { + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + private static ItemStack[] itemStackCache; public ItemForceFieldShape() { @@ -28,7 +34,6 @@ public class ItemForceFieldShape extends Item { setUnlocalizedName("warpdrive.forcefield.shape"); setCreativeTab(WarpDrive.creativeTabWarpDrive); - icons = new IIcon[EnumForceFieldShape.length]; itemStackCache = new ItemStack[EnumForceFieldShape.length]; } @@ -47,10 +52,12 @@ public class ItemForceFieldShape extends Item { return new ItemStack(WarpDrive.itemForceFieldShape, amount, enumForceFieldShape.ordinal()); } + @SideOnly(Side.CLIENT) @Override - public void registerIcons(IIconRegister par1IconRegister) { + public void registerIcons(IIconRegister iconRegister) { + icons = new IIcon[EnumForceFieldShape.length]; for(EnumForceFieldShape enumForceFieldShape : EnumForceFieldShape.values()) { - icons[enumForceFieldShape.ordinal()] = par1IconRegister.registerIcon("warpdrive:forcefield/shape_" + enumForceFieldShape.unlocalizedName); + icons[enumForceFieldShape.ordinal()] = iconRegister.registerIcon("warpdrive:forcefield/shape_" + enumForceFieldShape.unlocalizedName); } } diff --git a/src/main/java/cr0s/warpdrive/item/ItemForceFieldUpgrade.java b/src/main/java/cr0s/warpdrive/item/ItemForceFieldUpgrade.java index d5dc1fcf..35429a5e 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemForceFieldUpgrade.java +++ b/src/main/java/cr0s/warpdrive/item/ItemForceFieldUpgrade.java @@ -18,8 +18,14 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemForceFieldUpgrade extends Item { - private final IIcon[] icons; + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + private static ItemStack[] itemStackCache; public ItemForceFieldUpgrade() { @@ -28,7 +34,6 @@ public class ItemForceFieldUpgrade extends Item { setUnlocalizedName("warpdrive.forcefield.upgrade"); setCreativeTab(WarpDrive.creativeTabWarpDrive); - icons = new IIcon[EnumForceFieldUpgrade.length]; itemStackCache = new ItemStack[EnumForceFieldUpgrade.length]; } @@ -47,10 +52,12 @@ public class ItemForceFieldUpgrade extends Item { return new ItemStack(WarpDrive.itemForceFieldUpgrade, amount, enumForceFieldUpgrade.ordinal()); } + @SideOnly(Side.CLIENT) @Override - public void registerIcons(IIconRegister par1IconRegister) { + public void registerIcons(IIconRegister iconRegister) { + icons = new IIcon[EnumForceFieldUpgrade.length]; for(EnumForceFieldUpgrade enumForceFieldUpgrade : EnumForceFieldUpgrade.values()) { - icons[enumForceFieldUpgrade.ordinal()] = par1IconRegister.registerIcon("warpdrive:forcefield/upgrade_" + enumForceFieldUpgrade.unlocalizedName); + icons[enumForceFieldUpgrade.ordinal()] = iconRegister.registerIcon("warpdrive:forcefield/upgrade_" + enumForceFieldUpgrade.unlocalizedName); } } diff --git a/src/main/java/cr0s/warpdrive/item/ItemIC2reactorLaserFocus.java b/src/main/java/cr0s/warpdrive/item/ItemIC2reactorLaserFocus.java index 92d79c08..2cccabe7 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemIC2reactorLaserFocus.java +++ b/src/main/java/cr0s/warpdrive/item/ItemIC2reactorLaserFocus.java @@ -10,6 +10,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.Optional; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; @Optional.InterfaceList({ @Optional.Interface(iface = "ic2.api.reactor.IReactorComponent", modid = "IC2") @@ -25,9 +27,10 @@ public class ItemIC2reactorLaserFocus extends Item implements IReactorComponent setUnlocalizedName("warpdrive.energy.IC2reactorLaserFocus"); } + @SideOnly(Side.CLIENT) @Override - public void registerIcons(IIconRegister par1IconRegister) { - itemIcon = par1IconRegister.registerIcon("warpdrive:reactorFocus"); + public void registerIcons(IIconRegister iconRegister) { + itemIcon = iconRegister.registerIcon("warpdrive:reactorFocus"); } private static void damageComponent(ItemStack self, int damage) { diff --git a/src/main/java/cr0s/warpdrive/item/ItemTuningDriver.java b/src/main/java/cr0s/warpdrive/item/ItemTuningDriver.java index d8c8a7c0..72f92596 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemTuningDriver.java +++ b/src/main/java/cr0s/warpdrive/item/ItemTuningDriver.java @@ -26,11 +26,16 @@ import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemTuningDriver extends Item implements IWarpTool { + public static final int MODE_VIDEO_CHANNEL = 0; public static final int MODE_BEAM_FREQUENCY = 1; public static final int MODE_CONTROL_CHANNEL = 2; + @SideOnly(Side.CLIENT) private IIcon icons[]; public ItemTuningDriver() { @@ -42,6 +47,7 @@ public class ItemTuningDriver extends Item implements IWarpTool { setFull3D(); } + @SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister iconRegister) { icons = new IIcon[3]; diff --git a/src/main/java/cr0s/warpdrive/item/ItemTuningFork.java b/src/main/java/cr0s/warpdrive/item/ItemTuningFork.java index 2b1f5ee1..2dc90694 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemTuningFork.java +++ b/src/main/java/cr0s/warpdrive/item/ItemTuningFork.java @@ -23,7 +23,12 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemTuningFork extends Item implements IWarpTool { + + @SideOnly(Side.CLIENT) private IIcon icons[]; public ItemTuningFork() { @@ -36,6 +41,7 @@ public class ItemTuningFork extends Item implements IWarpTool { setHasSubtypes(true); } + @SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister iconRegister) { icons = new IIcon[16]; @@ -48,7 +54,8 @@ public class ItemTuningFork extends Item implements IWarpTool { public static String getDyeColorName(int metadata) { return ItemDye.field_150921_b[metadata]; } - + + @SideOnly(Side.CLIENT) @Override public IIcon getIconFromDamage(int damage) { if (damage < icons.length) { diff --git a/src/main/java/cr0s/warpdrive/item/ItemUpgrade.java b/src/main/java/cr0s/warpdrive/item/ItemUpgrade.java index afd328cf..d67b1206 100644 --- a/src/main/java/cr0s/warpdrive/item/ItemUpgrade.java +++ b/src/main/java/cr0s/warpdrive/item/ItemUpgrade.java @@ -12,9 +12,15 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class ItemUpgrade extends Item { + private static ItemStack[] isCache = new ItemStack[UpgradeType.values().length]; - private static IIcon[] iconBuffer = new IIcon[UpgradeType.values().length]; + + @SideOnly(Side.CLIENT) + private IIcon[] iconBuffer; public ItemUpgrade() { setHasSubtypes(true); @@ -84,8 +90,10 @@ public class ItemUpgrade extends Item { } } + @SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister ir) { + iconBuffer = new IIcon[UpgradeType.values().length]; for (UpgradeType val : UpgradeType.values()) { iconBuffer[val.ordinal()] = ir.registerIcon("warpdrive:upgrade" + val); }