mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 18:55:06 +00:00
Finish Hex Blocks (Fixes #98). Change block class names (warlordjones).
Fix items not loading
This commit is contained in:
1 parent
fbbe24152c
commit
89ed8e94ac
21 files changed
+104
-96
No files matched your search
@@ -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();
|
||||
|
||||
+6
-6
@@ -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;
|
||||
+2
-2
@@ -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;
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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<? extends ItemCarvable> 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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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) });
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user