Jump to content

Recommended Posts

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.