Posted July 4, 20178 yr Hello. I've created a bunch of simple blocks. But the light dosen't work. I don't know why because everthing seems to be correct. public Blockbridgeblack1180(String unlocalizedName, String registryName) { super(Material.ROCK); this.setUnlocalizedName(unlocalizedName); this.setRegistryName(new ResourceLocation(References.MODID, registryName)); this.setLightLevel(1.0F); this.setHardness(20); //Sets how hard the block is to break this.setResistance(20); //Sets the blocks blast resistance to explosions } And there is my ModBlock class : public class ModBlocks { public static Block bridgeblack1176; public static Block bridgeblack1178; public static Block bridgeblack1180; public static void init() { bridgeblack1176 = new Blockbridgeblack1176("bridgeblack1176", "bridgeblack1176"); bridgeblack1178 = new Blockbridgeblack1178("bridgeblack1178", "bridgeblack1178"); bridgeblack1180 = new Blockbridgeblack1178("bridgeblack1180", "bridgeblack1180"); } public static void register() { registerBlock(bridgeblack1176); registerBlock(bridgeblack1178); registerBlock(bridgeblack1180); } public static void registerRenders() { registerRender(bridgeblack1176); registerRender(bridgeblack1178); registerRender(bridgeblack1180); } public static void registerBlock(Block block) { block.setCreativeTab(MainClass.TabB); GameRegistry.register(block); GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName())); Utools.getLogger().info("Register block for" + block.getUnlocalizedName().substring(5)); } public static void registerRender(Block block) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(References.MODID, block.getUnlocalizedName().substring(5)), "inventory")); Utools.getLogger().info("Register render for" + block.getUnlocalizedName().substring(5));; } } Where is the problem ? I don't find anything wrong. Thanks for the help
July 4, 20178 yr 1 minute ago, themistik said: bridgeblack1180 = new Blockbridgeblack1178 1180 != 1178. That's one of the reasons to use descriptive class names.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.