15 lines less registering code
@@ -11,6 +11,7 @@ import net.geforcemods.securitycraft.renderers.TileEntityKeypadChestRenderer;
import net.geforcemods.securitycraft.renderers.TileEntitySecurityCameraRenderer;
import net.geforcemods.securitycraft.tileentity.TileEntityKeypadChest;
import net.geforcemods.securitycraft.tileentity.TileEntitySecurityCamera;
+import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemMeshDefinition;
@@ -153,14 +154,7 @@ public class ClientProxy extends ServerProxy{
TileEntityItemStackRenderer.instance = new ItemKeypadChestRenderer();
- //registering reinforced blocks color overlay for world
- Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new IBlockColor() { //everyone who uses Java 7: fuck you and update to Java 8, this could be written so much nicer
- @Override
- public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex)
- {
- return 0x999999;
- }
- }, mod_SecurityCraft.reinforcedCobblestone,
+ Block[] blocksToColor = {mod_SecurityCraft.reinforcedCobblestone,
mod_SecurityCraft.reinforcedDirt,
mod_SecurityCraft.reinforcedDoubleStoneSlabs,
mod_SecurityCraft.reinforcedDoubleWoodSlabs,
@@ -177,7 +171,15 @@ public class ClientProxy extends ServerProxy{
mod_SecurityCraft.reinforcedStone,
mod_SecurityCraft.reinforcedStoneSlabs,
mod_SecurityCraft.reinforcedWoodPlanks,
- mod_SecurityCraft.reinforcedWoodSlabs);
+ mod_SecurityCraft.reinforcedWoodSlabs};
+ //registering reinforced blocks color overlay for world
+ Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new IBlockColor() { //everyone who uses Java 7: fuck you and update to Java 8, this could be written so much nicer
+ @Override
+ public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex)
+ {
+ return 0x999999;
+ }
+ }, blocksToColor);
//same thing for inventory
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() { //everyone who uses Java 7: fuck you and update to Java 8, this could be written so much nicer
@Override
@@ -185,23 +187,6 @@ public class ClientProxy extends ServerProxy{
{
return 0x999999;
}
- }, mod_SecurityCraft.reinforcedCobblestone,
- mod_SecurityCraft.reinforcedDirt,
- mod_SecurityCraft.reinforcedDoubleStoneSlabs,
- mod_SecurityCraft.reinforcedDoubleWoodSlabs,
- mod_SecurityCraft.reinforcedSandstone,
- mod_SecurityCraft.reinforcedStairsAcacia,
- mod_SecurityCraft.reinforcedStairsBirch,
- mod_SecurityCraft.reinforcedStairsCobblestone,
- mod_SecurityCraft.reinforcedStairsDarkoak,
- mod_SecurityCraft.reinforcedStairsJungle,
- mod_SecurityCraft.reinforcedStairsOak,
- mod_SecurityCraft.reinforcedStairsSandstone,
- mod_SecurityCraft.reinforcedStairsSpruce,
- mod_SecurityCraft.reinforcedStairsStone,
- mod_SecurityCraft.reinforcedStone,
- mod_SecurityCraft.reinforcedStoneSlabs,
- mod_SecurityCraft.reinforcedWoodPlanks,
- mod_SecurityCraft.reinforcedWoodSlabs);
+ }, blocksToColor);
}
}
