diff --git a/src/main/java/com/cricketcraft/chisel/Chisel.java b/src/main/java/com/cricketcraft/chisel/Chisel.java index fb7abc29..16a4fcca 100644 --- a/src/main/java/com/cricketcraft/chisel/Chisel.java +++ b/src/main/java/com/cricketcraft/chisel/Chisel.java @@ -69,6 +69,7 @@ public class Chisel { public static int renderCTMId; public static int renderCarpetId; public static int renderAutoChiselId; + public static int renderGlowId; @Instance(MOD_ID) public static Chisel instance; @@ -126,12 +127,9 @@ public class Chisel { public void preInit(FMLPreInitializationEvent event) { modsSupported.add("Thaumcraft"); modsSupported.add("AWWayOfTime"); - - /* - * These mods will enable no blocks in chisel. IF YOU REENABLE THESE BLOCKS, THE GAME WILL CRASH UPON TRYING TO RENDER MISSING BLOCK IN THE CREATIVE TABS! See issue #106 for more info! ~Drull - * - * modsSupported.add("Twilight Forest"); modsSupported.add("appliedenergistics2"); modsSupported.add("Railcraft"); - */ + modsSupported.add("Twilight Forest"); + modsSupported.add("appliedenergistics2"); + modsSupported.add("Railcraft"); File configFile = event.getSuggestedConfigurationFile(); Configurations.configExists = configFile.exists(); diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleSlab.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java similarity index 90% rename from src/main/java/com/cricketcraft/chisel/block/BlockMarbleSlab.java rename to src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java index bf9bb645..34dc90df 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleSlab.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableSlab.java @@ -16,26 +16,26 @@ import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class BlockMarbleSlab extends BlockCarvable { +public class BlockCarvableSlab extends BlockCarvable { public Block master; - public BlockMarbleSlab bottom; - public BlockMarbleSlab top; + public BlockCarvableSlab bottom; + public BlockCarvableSlab top; public boolean isBottom; - public BlockMarbleSlab(BlockCarvable marble) { + public BlockCarvableSlab(BlockCarvable marble) { opaque = true; setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F); master = marble; bottom = this; - top = new BlockMarbleSlab(this); + top = new BlockCarvableSlab(this); isBottom = true; } - public BlockMarbleSlab(BlockMarbleSlab bottomBlock) { + public BlockCarvableSlab(BlockCarvableSlab bottomBlock) { super(); setBlockBounds(0.0F, 0.5F, 0.0F, 1.0F, 1.0F, 1.0F); master = bottomBlock.master; diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairs.java b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java similarity index 94% rename from src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairs.java rename to src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java index 59a6525e..f7dafbf6 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairs.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockCarvableStairs.java @@ -18,12 +18,12 @@ import com.cricketcraft.chisel.carving.CarvableHelper; import com.cricketcraft.chisel.carving.CarvableVariation; import com.cricketcraft.chisel.client.render.BlockMarbleStairsRenderer; -public class BlockMarbleStairs extends BlockStairs implements ICarvable { +public class BlockCarvableStairs extends BlockStairs implements ICarvable { CarvableHelper carverHelper; int blockMeta; - public BlockMarbleStairs(Block block, int meta, CarvableHelper helper) { + public BlockCarvableStairs(Block block, int meta, CarvableHelper helper) { super(block, meta); this.useNeighborBrightness = true; diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleIceStairs.java b/src/main/java/com/cricketcraft/chisel/block/BlockMarbleIceStairs.java index 64fba5c2..7480c6dd 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleIceStairs.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockMarbleIceStairs.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; import com.cricketcraft.chisel.carving.CarvableHelper; import com.cricketcraft.chisel.init.ChiselBlocks; -public class BlockMarbleIceStairs extends BlockMarbleStairs { +public class BlockMarbleIceStairs extends BlockCarvableStairs { public BlockMarbleIceStairs(Block block, int meta, CarvableHelper helper) { super(block, meta, helper); diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockMarblePackedIceStairs.java b/src/main/java/com/cricketcraft/chisel/block/BlockMarblePackedIceStairs.java index 5aa9ee10..c506ce04 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockMarblePackedIceStairs.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockMarblePackedIceStairs.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; import com.cricketcraft.chisel.carving.CarvableHelper; import com.cricketcraft.chisel.init.ChiselBlocks; -public class BlockMarblePackedIceStairs extends BlockMarbleStairs { +public class BlockMarblePackedIceStairs extends BlockCarvableStairs { public BlockMarblePackedIceStairs(Block block, int meta, CarvableHelper helper) { super(block, meta, helper); diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMaker.java b/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMaker.java index 1d6441db..095d7272 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMaker.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMaker.java @@ -13,7 +13,7 @@ import cpw.mods.fml.common.registry.GameRegistry; public class BlockMarbleStairsMaker { public CarvableHelper carverHelper; - BlockMarbleStairs blocks[]; + BlockCarvableStairs blocks[]; // int idStart; Block blockBase; @@ -29,10 +29,10 @@ public class BlockMarbleStairsMaker { } public void create(BlockMarbleStairsMakerCreator creator, String name) { - blocks = new BlockMarbleStairs[carverHelper.variations.size() / 2]; + blocks = new BlockCarvableStairs[carverHelper.variations.size() / 2]; for (int i = 0; i < blocks.length; i++) { String n = name + "." + i; - blocks[i] = creator == null ? new BlockMarbleStairs(blockBase, i * 2, carverHelper) : creator.create(blockBase, i * 2, carverHelper); + blocks[i] = creator == null ? new BlockCarvableStairs(blockBase, i * 2, carverHelper) : creator.create(blockBase, i * 2, carverHelper); blocks[i].setBlockName(n); GameRegistry.registerBlock(blocks[i], ItemCarvable.class, n); diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMakerCreator.java b/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMakerCreator.java index 9dccda72..a850081c 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMakerCreator.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockMarbleStairsMakerCreator.java @@ -6,5 +6,5 @@ import com.cricketcraft.chisel.carving.CarvableHelper; public interface BlockMarbleStairsMakerCreator { - public BlockMarbleStairs create(Block block, int meta, CarvableHelper helper); + public BlockCarvableStairs create(Block block, int meta, CarvableHelper helper); } diff --git a/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java b/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java index 59d3b423..98a7fa59 100644 --- a/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java +++ b/src/main/java/com/cricketcraft/chisel/carving/CarvableHelper.java @@ -15,7 +15,7 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import com.cricketcraft.chisel.Chisel; -import com.cricketcraft.chisel.block.BlockMarbleSlab; +import com.cricketcraft.chisel.block.BlockCarvableSlab; import com.cricketcraft.chisel.carving.CarvableVariation.CarvableVariationCTM; import com.cricketcraft.chisel.client.render.CTM; import com.cricketcraft.chisel.client.render.TextureSubmap; @@ -275,15 +275,15 @@ public class CarvableHelper { public void register(Block block, String name, Class cl) { registerBlock(block, name, cl); - if (block instanceof BlockMarbleSlab) { - BlockMarbleSlab slab = (BlockMarbleSlab) block; + if (block instanceof BlockCarvableSlab) { + BlockCarvableSlab slab = (BlockCarvableSlab) block; } for (CarvableVariation variation : variations) { registerVariation(name, variation, block, variation.metadata); - if (block instanceof BlockMarbleSlab && ((BlockMarbleSlab) block).isBottom) { - BlockMarbleSlab slab = (BlockMarbleSlab) block; + if (block instanceof BlockCarvableSlab && ((BlockCarvableSlab) block).isBottom) { + BlockCarvableSlab slab = (BlockCarvableSlab) block; if (!forbidChiseling) { Carving.chisel.addVariation(name + ".top", slab.top, variation.metadata, 0); diff --git a/src/main/java/com/cricketcraft/chisel/client/render/BlockMarbleStairsRenderer.java b/src/main/java/com/cricketcraft/chisel/client/render/BlockMarbleStairsRenderer.java index ed77218b..e1db9fcf 100644 --- a/src/main/java/com/cricketcraft/chisel/client/render/BlockMarbleStairsRenderer.java +++ b/src/main/java/com/cricketcraft/chisel/client/render/BlockMarbleStairsRenderer.java @@ -6,7 +6,7 @@ import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; -import com.cricketcraft.chisel.block.BlockMarbleStairs; +import com.cricketcraft.chisel.block.BlockCarvableStairs; import com.cricketcraft.chisel.utils.Drawing; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; @@ -31,9 +31,9 @@ public class BlockMarbleStairsRenderer implements ISimpleBlockRenderingHandler { @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block blck, int modelId, RenderBlocks renderer) { - if (blck == null || !(blck instanceof BlockMarbleStairs)) + if (blck == null || !(blck instanceof BlockCarvableStairs)) return false; - BlockMarbleStairs block = (BlockMarbleStairs) blck; + BlockCarvableStairs block = (BlockCarvableStairs) blck; renderer.renderBlockStairs(block, x, y, z); diff --git a/src/main/java/com/cricketcraft/chisel/client/render/tile/RenderAutoChisel.java b/src/main/java/com/cricketcraft/chisel/client/render/tile/RenderAutoChisel.java index 0e29814f..4abc29ed 100644 --- a/src/main/java/com/cricketcraft/chisel/client/render/tile/RenderAutoChisel.java +++ b/src/main/java/com/cricketcraft/chisel/client/render/tile/RenderAutoChisel.java @@ -27,6 +27,7 @@ import com.cricketcraft.chisel.Chisel; import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -127,6 +128,8 @@ public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimp private final RenderItem renderTargetAndChisel, renderBase; public RenderAutoChisel() { + Chisel.renderAutoChiselId = RenderingRegistry.getNextAvailableRenderId(); + renderTargetAndChisel = new RenderItem() { @Override diff --git a/src/main/java/com/cricketcraft/chisel/entity/fx/EntityBallOMossFX.java b/src/main/java/com/cricketcraft/chisel/entity/fx/EntityBallOMossFX.java index 01ff12bb..d4caf24b 100644 --- a/src/main/java/com/cricketcraft/chisel/entity/fx/EntityBallOMossFX.java +++ b/src/main/java/com/cricketcraft/chisel/entity/fx/EntityBallOMossFX.java @@ -97,7 +97,7 @@ public class EntityBallOMossFX extends EntityFX { // setParticleIcon(block.particles[General.rand.nextInt(block.particles.length)]); - icon = ChiselItems.itemBallOMoss.getIconFromDamage(0); + icon = ChiselItems.ballomoss.getIconFromDamage(0); float width = 4.0f + General.rand.nextFloat() * 8.0f; float uu = General.rand.nextFloat() * (16.0f - width); float vv = General.rand.nextFloat() * (16.0f - width); diff --git a/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java b/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java index c4779141..da7ea968 100644 --- a/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java +++ b/src/main/java/com/cricketcraft/chisel/init/ChiselBlocks.java @@ -20,8 +20,8 @@ import com.cricketcraft.chisel.block.BlockMarbleIce; import com.cricketcraft.chisel.block.BlockMarbleIceStairs; import com.cricketcraft.chisel.block.BlockMarblePackedIce; import com.cricketcraft.chisel.block.BlockMarblePackedIceStairs; -import com.cricketcraft.chisel.block.BlockMarbleSlab; -import com.cricketcraft.chisel.block.BlockMarbleStairs; +import com.cricketcraft.chisel.block.BlockCarvableSlab; +import com.cricketcraft.chisel.block.BlockCarvableStairs; import com.cricketcraft.chisel.block.BlockMarbleTexturedOre; import com.cricketcraft.chisel.block.BlockMarbleWall; import com.cricketcraft.chisel.block.BlockPresent; @@ -41,9 +41,9 @@ public final class ChiselBlocks { public static final BlockCarvable marble = null; public static final BlockCarvable marble_pillar = null; public static final BlockCarvable limestone = null; - public static final BlockMarbleSlab marble_slab = null; - public static final BlockMarbleSlab limestone_slab = null; - public static final BlockMarbleSlab marble_pillar_slab = null; + public static final BlockCarvableSlab marble_slab = null; + public static final BlockCarvableSlab limestone_slab = null; + public static final BlockCarvableSlab marble_pillar_slab = null; public static final BlockCarvable cobblestone = null; public static final BlockMarbleWall cobblestoneWall = null; public static final BlockCarvableGlass glass = null; @@ -62,8 +62,8 @@ public final class ChiselBlocks { public static final BlockCarvable netherrack = null; public static final BlockCarvable mossy_cobblestone = null; public static final BlockCarvable stonebricksmooth = null; - public static final BlockMarbleStairs marbleStairs = null; - public static final BlockMarbleStairs limestoneStairs = null; + public static final BlockCarvableStairs marbleStairs = null; + public static final BlockCarvableStairs limestoneStairs = null; public static final BlockCarvablePane iron_bars = null; public static final BlockMarbleIce ice = null; public static final BlockMarbleIce ice_pillar = null; diff --git a/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java b/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java index 6b97247c..227b59a2 100644 --- a/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java +++ b/src/main/java/com/cricketcraft/chisel/init/ChiselItems.java @@ -13,9 +13,9 @@ import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; public final class ChiselItems { public static final ItemChisel chisel = null; - public static final ItemCloudInABottle itemCloudInABottle = null; - public static final ItemBallOMoss itemBallOMoss = null; - public static final ItemSmashingRock smashingRock = null; + public static final ItemCloudInABottle cloudinabottle = null; + public static final ItemBallOMoss ballomoss = null; + public static final ItemSmashingRock smashingrock = null; public static final ItemUpgrade upgrade = null; private ChiselItems() { diff --git a/src/main/java/com/cricketcraft/chisel/init/Features.java b/src/main/java/com/cricketcraft/chisel/init/Features.java index da1a0e8d..440fed47 100644 --- a/src/main/java/com/cricketcraft/chisel/init/Features.java +++ b/src/main/java/com/cricketcraft/chisel/init/Features.java @@ -5,6 +5,7 @@ import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; +import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.StatCollector; @@ -17,6 +18,7 @@ import com.cricketcraft.chisel.block.BlockAutoChisel; import com.cricketcraft.chisel.block.BlockBeaconBase; import com.cricketcraft.chisel.block.BlockCarvable; import com.cricketcraft.chisel.block.BlockCarvableGlass; +import com.cricketcraft.chisel.block.BlockCarvableGlow; import com.cricketcraft.chisel.block.BlockCarvablePane; import com.cricketcraft.chisel.block.BlockCarvablePowered; import com.cricketcraft.chisel.block.BlockCarvablePumpkin; @@ -36,8 +38,8 @@ import com.cricketcraft.chisel.block.BlockMarbleIceStairs; import com.cricketcraft.chisel.block.BlockMarblePackedIce; import com.cricketcraft.chisel.block.BlockMarblePackedIceStairs; import com.cricketcraft.chisel.block.BlockMarblePillar; -import com.cricketcraft.chisel.block.BlockMarbleSlab; -import com.cricketcraft.chisel.block.BlockMarbleStairs; +import com.cricketcraft.chisel.block.BlockCarvableSlab; +import com.cricketcraft.chisel.block.BlockCarvableStairs; import com.cricketcraft.chisel.block.BlockMarbleStairsMaker; import com.cricketcraft.chisel.block.BlockMarbleStairsMakerCreator; import com.cricketcraft.chisel.block.BlockMarbleTexturedOre; @@ -66,7 +68,6 @@ import com.cricketcraft.chisel.item.ItemUpgrade; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; - import static com.cricketcraft.chisel.init.ChiselBlocks.*; import static com.cricketcraft.chisel.utils.General.*; @@ -146,7 +147,7 @@ public enum Features { @Override void addItems() { ItemUpgrade upgrade = (ItemUpgrade) new ItemUpgrade("upgrade").setCreativeTab(ChiselTabs.tabChisel); - GameRegistry.registerItem(upgrade, upgrade.getUnlocalizedName()); + GameRegistry.registerItem(upgrade, "upgrade"); } }, @@ -154,14 +155,14 @@ public enum Features { @Override void addItems() { - ItemBallOMoss itemBallOMoss = (ItemBallOMoss) new ItemBallOMoss().setTextureName("Chisel:ballomoss").setCreativeTab(ChiselTabs.tabChisel); + ItemBallOMoss ballomoss = (ItemBallOMoss) new ItemBallOMoss().setTextureName("Chisel:ballomoss").setCreativeTab(ChiselTabs.tabChisel); EntityRegistry.registerModEntity(EntityBallOMoss.class, "BallOMoss", 2, Chisel.instance, 40, 1, true); - GameRegistry.registerItem(itemBallOMoss, "ballomoss"); + GameRegistry.registerItem(ballomoss, "ballomoss"); } @Override void addRecipes() { - GameRegistry.addRecipe(new ItemStack(ChiselItems.itemBallOMoss, 1), "XYX", "YXY", "XYX", 'X', Blocks.vine, 'Y', Items.stick); + GameRegistry.addRecipe(new ItemStack(ChiselItems.ballomoss, 1), "XYX", "YXY", "XYX", 'X', Blocks.vine, 'Y', Items.stick); } }, @@ -353,7 +354,7 @@ public enum Features { @Override void addRecipes() { - GameRegistry.addRecipe(new ItemStack(ChiselItems.itemCloudInABottle, 1), "X X", "XYX", " X ", 'X', Blocks.glass, 'Y', Items.quartz); + GameRegistry.addRecipe(new ItemStack(ChiselItems.cloudinabottle, 1), "X X", "XYX", " X ", 'X', Blocks.glass, 'Y', Items.quartz); } }, @@ -878,23 +879,10 @@ public enum Features { @Override void addBlocks() { - BlockCarvable hexPlating = (BlockCarvable) new BlockCarvable().setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.0.desc"), 0, "hexPlating/black"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.1.desc"), 1, "hexPlating/blue"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.2.desc"), 2, "hexPlating/brown"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.3.desc"), 3, "hexPlating/cyan"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.4.desc"), 4, "hexPlating/green"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.5.desc"), 5, "hexPlating/light_blue"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.6.desc"), 6, "hexPlating/light_gray"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.7.desc"), 7, "hexPlating/lime"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.8.desc"), 8, "hexPlating/magenta"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.9.desc"), 9, "hexPlating/orange"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.10.desc"), 10, "hexPlating/pink"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.11.desc"), 11, "hexPlating/purple"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.12.desc"), 12, "hexPlating/red"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.13.desc"), 13, "hexPlating/white"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.14.desc"), 14, "hexPlating/yellow"); - hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating.15.desc"), 15, "hexPlating/gray"); + BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("hexPlating/hexOverlay").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F); + for (int i = 0; i < 16; i++) { + hexPlating.carverHelper.addVariation(StatCollector.translateToLocal("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc"), i, "hexPlating/hexBase"); + } hexPlating.carverHelper.register(hexPlating, "hexPlating"); Carving.chisel.registerOre("hexPlating", "hexPlating"); } @@ -1024,7 +1012,7 @@ public enum Features { makerIceStairs.create(new BlockMarbleStairsMakerCreator() { @Override - public BlockMarbleStairs create(Block block, int meta, CarvableHelper helper) { + public BlockCarvableStairs create(Block block, int meta, CarvableHelper helper) { return new BlockMarbleIceStairs(block, meta, helper); } }, "ice_stairs"); @@ -1234,7 +1222,7 @@ public enum Features { OreDictionary.registerOre("limestone", limestone); Carving.chisel.registerOre("limestone", "limestone"); - BlockCarvable limestone_slab = (BlockMarbleSlab) new BlockMarbleSlab(limestone).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(2.0F).setResistance(10F); + BlockCarvable limestone_slab = (BlockCarvableSlab) new BlockCarvableSlab(limestone).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(2.0F).setResistance(10F); limestone_slab.carverHelper.setChiselBlockName("Limestone Slab"); limestone_slab.carverHelper.addVariation(StatCollector.translateToLocal("tile.limestoneSlab.0.desc"), 0, "limestone"); limestone_slab.carverHelper.addVariation(StatCollector.translateToLocal("tile.limestoneSlab.1.desc"), 1, "limestone/terrain-cobbsmalltilelight"); @@ -1311,7 +1299,7 @@ public enum Features { OreDictionary.registerOre("blockMarble", marble); Carving.chisel.registerOre("marble", "marble"); - BlockCarvable marble_slab = (BlockMarbleSlab) new BlockMarbleSlab(marble).setHardness(2.0F).setResistance(10F); + BlockCarvable marble_slab = (BlockCarvableSlab) new BlockCarvableSlab(marble).setHardness(2.0F).setResistance(10F); marble_slab.carverHelper.setChiselBlockName("Marble Slab"); marble_slab.carverHelper.addVariation(StatCollector.translateToLocal("tile.marbleSlab.0.desc"), 0, "marble"); marble_slab.carverHelper.addVariation(StatCollector.translateToLocal("tile.marbleSlab.1.desc"), 1, "marbleslab/a1-stoneornamental-marblebrick"); @@ -1410,7 +1398,7 @@ public enum Features { marble_pillar.carverHelper.register(marble_pillar, "marble_pillar"); Carving.chisel.setGroupClass("marble_pillar", "marble"); - BlockCarvable marble_pillar_slab = (BlockMarbleSlab) new BlockMarbleSlab(marble_pillar).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(2.0F).setResistance(10F) + BlockCarvable marble_pillar_slab = (BlockCarvableSlab) new BlockCarvableSlab(marble_pillar).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(2.0F).setResistance(10F) .setStepSound(Block.soundTypeStone); marble_pillar_slab.carverHelper.setChiselBlockName("Marble Pillar Slab"); if (Configurations.oldPillars) { @@ -1619,7 +1607,7 @@ public enum Features { makerPackedIceStairs.create(new BlockMarbleStairsMakerCreator() { @Override - public BlockMarbleStairs create(Block block, int meta, CarvableHelper helper) { + public BlockCarvableStairs create(Block block, int meta, CarvableHelper helper) { return new BlockMarblePackedIceStairs(block, meta, helper); } }, "packedice_stairs"); @@ -1916,14 +1904,14 @@ public enum Features { @Override void addItems() { - ItemSmashingRock smashingRock = (ItemSmashingRock) new ItemSmashingRock().setTextureName("Chisel:smashingrock").setCreativeTab(ChiselTabs.tabChisel); + ItemSmashingRock smashingrock = (ItemSmashingRock) new ItemSmashingRock().setTextureName("Chisel:smashingrock").setCreativeTab(ChiselTabs.tabChisel); EntityRegistry.registerModEntity(EntitySmashingRock.class, "SmashingRock", 2, Chisel.instance, 40, 1, true); - GameRegistry.registerItem(smashingRock, "smashingrock"); + GameRegistry.registerItem(smashingrock, "smashingrock"); } @Override void addRecipes() { - GameRegistry.addShapelessRecipe(new ItemStack(ChiselItems.smashingRock, 16), new Object[] { new ItemStack(Items.stone_pickaxe), new ItemStack(Items.glass_bottle, 1), + GameRegistry.addShapelessRecipe(new ItemStack(ChiselItems.smashingrock, 16), new Object[] { new ItemStack(Items.stone_pickaxe), new ItemStack(Items.glass_bottle, 1), new ItemStack(Items.stone_shovel) }); } }, diff --git a/src/main/java/com/cricketcraft/chisel/item/ItemMarbleSlab.java b/src/main/java/com/cricketcraft/chisel/item/ItemMarbleSlab.java index a09b23de..884e364c 100644 --- a/src/main/java/com/cricketcraft/chisel/item/ItemMarbleSlab.java +++ b/src/main/java/com/cricketcraft/chisel/item/ItemMarbleSlab.java @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import com.cricketcraft.chisel.block.BlockMarbleSlab; +import com.cricketcraft.chisel.block.BlockCarvableSlab; public class ItemMarbleSlab extends ItemCarvable { @@ -16,7 +16,7 @@ public class ItemMarbleSlab extends ItemCarvable { @Override public boolean func_150936_a(World world, int x, int y, int z, int side, EntityPlayer player, ItemStack stack) { - BlockMarbleSlab block = (BlockMarbleSlab) Block.getBlockFromItem(this); + BlockCarvableSlab block = (BlockCarvableSlab) Block.getBlockFromItem(this); switch (side) { case 0: @@ -48,7 +48,7 @@ public class ItemMarbleSlab extends ItemCarvable { @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hx, float hy, float hz) { - BlockMarbleSlab block = (BlockMarbleSlab) Block.getBlockFromItem(this); + BlockCarvableSlab block = (BlockCarvableSlab) Block.getBlockFromItem(this); Block targetBlock = world.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); diff --git a/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java b/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java index e6eca230..65c9d881 100644 --- a/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java +++ b/src/main/java/com/cricketcraft/chisel/proxy/ClientProxy.java @@ -10,6 +10,7 @@ import com.cricketcraft.chisel.block.tileentity.TileEntityPresent; import com.cricketcraft.chisel.client.render.BlockAdvancedMarbleRenderer; import com.cricketcraft.chisel.client.render.BlockCarpetRenderer; import com.cricketcraft.chisel.client.render.BlockEldritchRenderer; +import com.cricketcraft.chisel.client.render.BlockGlowRenderer; import com.cricketcraft.chisel.client.render.BlockMarblePaneRenderer; import com.cricketcraft.chisel.client.render.BlockMarblePillarRenderer; import com.cricketcraft.chisel.client.render.BlockMarbleStairsRenderer; @@ -49,11 +50,11 @@ public class ClientProxy extends CommonProxy { RenderingRegistry.registerBlockHandler(new BlockEldritchRenderer()); RenderingRegistry.registerBlockHandler(new BlockAdvancedMarbleRenderer()); RenderingRegistry.registerBlockHandler(new BlockCarpetRenderer()); + RenderingRegistry.registerBlockHandler(new BlockGlowRenderer()); RenderingRegistry.registerBlockHandler(new BlockTexturedOreRenderer()); RenderAutoChisel rac = new RenderAutoChisel(); - Chisel.renderAutoChiselId = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(rac); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ChiselBlocks.autoChisel), rac); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAutoChisel.class, rac); @@ -64,9 +65,9 @@ public class ClientProxy extends CommonProxy { MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ChiselBlocks.present[x]), new ItemPresentRenderer(x)); } - RenderingRegistry.registerEntityRenderingHandler(EntityCloudInABottle.class, new RenderSnowball(ChiselItems.itemCloudInABottle)); - RenderingRegistry.registerEntityRenderingHandler(EntityBallOMoss.class, new RenderSnowball(ChiselItems.itemBallOMoss)); - RenderingRegistry.registerEntityRenderingHandler(EntitySmashingRock.class, new RenderSnowball(ChiselItems.smashingRock)); + RenderingRegistry.registerEntityRenderingHandler(EntityCloudInABottle.class, new RenderSnowball(ChiselItems.cloudinabottle)); + RenderingRegistry.registerEntityRenderingHandler(EntityBallOMoss.class, new RenderSnowball(ChiselItems.ballomoss)); + RenderingRegistry.registerEntityRenderingHandler(EntitySmashingRock.class, new RenderSnowball(ChiselItems.smashingrock)); MinecraftForgeClient.registerItemRenderer(ChiselItems.chisel, renderer); } diff --git a/src/main/java/com/cricketcraft/chisel/utils/Drawing.java b/src/main/java/com/cricketcraft/chisel/utils/Drawing.java index e085d3a3..a34638e0 100644 --- a/src/main/java/com/cricketcraft/chisel/utils/Drawing.java +++ b/src/main/java/com/cricketcraft/chisel/utils/Drawing.java @@ -64,4 +64,13 @@ public class Drawing { renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta)); tessellator.draw(); } + + public static void renderAllFaces(RenderBlocks renderer, Block block, int x, int y, int z, IIcon icon) { + renderer.renderFaceYNeg(block, x, y, z, icon); + renderer.renderFaceYPos(block, x, y, z, icon); + renderer.renderFaceZNeg(block, x, y, z, icon); + renderer.renderFaceZPos(block, x, y, z, icon); + renderer.renderFaceXNeg(block, x, y, z, icon); + renderer.renderFaceXPos(block, x, y, z, icon); + } } diff --git a/src/main/java/com/cricketcraft/chisel/utils/GeneralClient.java b/src/main/java/com/cricketcraft/chisel/utils/GeneralClient.java index 547283fb..ab99288e 100644 --- a/src/main/java/com/cricketcraft/chisel/utils/GeneralClient.java +++ b/src/main/java/com/cricketcraft/chisel/utils/GeneralClient.java @@ -3,6 +3,8 @@ package com.cricketcraft.chisel.utils; import java.util.HashMap; import java.util.Random; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -33,5 +35,12 @@ public class GeneralClient { Minecraft.getMinecraft().getTextureManager().bindTexture(res); } - + + public static void setGLColorFromInt(int color) + { + float red = (color >> 16 & 255) / 255.0F; + float green = (color >> 8 & 255) / 255.0F; + float blue = (color & 255) / 255.0F; + GL11.glColor4f(red, green, blue, 1.0F); + } } diff --git a/src/main/resources/assets/chisel/lang/en_US.lang b/src/main/resources/assets/chisel/lang/en_US.lang index 3080d76e..36e7a8a2 100644 --- a/src/main/resources/assets/chisel/lang/en_US.lang +++ b/src/main/resources/assets/chisel/lang/en_US.lang @@ -114,22 +114,22 @@ tile.waterstone.6.desc=Ornate Water Panel #Hex Plating tile.hexPlating.name=Hex Plating -tile.hexPlating.0.desc=Black Plating -tile.hexPlating.1.desc=Blue Plating -tile.hexPlating.2.desc=Brown Plating -tile.hexPlating.3.desc=Cyan Plating -tile.hexPlating.4.desc=Green Plating -tile.hexPlating.5.desc=Light Blue Plating -tile.hexPlating.6.desc=Light Gray Plating -tile.hexPlating.7.desc=Lime Plating -tile.hexPlating.8.desc=Magenta Plating -tile.hexPlating.9.desc=Orange Plating -tile.hexPlating.10.desc=Pink Plating -tile.hexPlating.11.desc=Purple Plating -tile.hexPlating.12.desc=Red Plating -tile.hexPlating.13.desc=White Plating -tile.hexPlating.14.desc=Yellow Plating -tile.hexPlating.15.desc=Gray Plating +tile.hexPlating.black.desc=Black Plating +tile.hexPlating.blue.desc=Blue Plating +tile.hexPlating.brown.desc=Brown Plating +tile.hexPlating.cyan.desc=Cyan Plating +tile.hexPlating.green.desc=Green Plating +tile.hexPlating.light_blue.desc=Light Blue Plating +tile.hexPlating.light_gray.desc=Light Gray Plating +tile.hexPlating.lime.desc=Lime Plating +tile.hexPlating.magenta.desc=Magenta Plating +tile.hexPlating.orange.desc=Orange Plating +tile.hexPlating.pink.desc=Pink Plating +tile.hexPlating.purple.desc=Purple Plating +tile.hexPlating.red.desc=Red Plating +tile.hexPlating.white.desc=White Plating +tile.hexPlating.yellow.desc=Yellow Plating +tile.hexPlating.gray.desc=Gray Plating #Grimstone tile.grimstone.name=Grimstone diff --git a/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexGrayScale.png b/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexBase.png similarity index 59% rename from src/main/resources/assets/chisel/textures/blocks/hexPlating/hexGrayScale.png rename to src/main/resources/assets/chisel/textures/blocks/hexPlating/hexBase.png index 96b4e9bd..a0f5b7cc 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexGrayScale.png and b/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexBase.png differ diff --git a/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexOverlay.png b/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexOverlay.png index a0f5b7cc..96b4e9bd 100644 Binary files a/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexOverlay.png and b/src/main/resources/assets/chisel/textures/blocks/hexPlating/hexOverlay.png differ