Jump to content

Recommended Posts

Posted

Ok so I updated my mod from 1.5 to 1.5.1 and of course they had to change even more things for the textures. I have all my items, tools, and weapons working with textures. The only thing not working is my blocks, they simply do not show up when in game, the texture is a white box saying something like "No texture on here" or something. Here is my ItemOre class or my CustomBlock class.

 

package tutorial;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tutorial.client.ClientProxy.ClientProxy;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;

public class ItemOre extends Block {

private String blockTexture;

public ItemOre(int par1, Material par2Material, String par3String){
	super(par1, par2Material);

	this.blockTexture = par3String;
}


@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister){
	this.blockIcon = par1IconRegister.registerIcon("mod/" + this.blockTexture);
}

}

 

Here is the line in my code where Im registering the block in my mod_tutorial class.

BlueOre = new ItemOre(539, Material.iron, "BlueOre").setHardness(3.0F).setResistance(3.0F).setUnlocalizedName("BlueOre").setCreativeTab(tabJVCraft);

 

Also know this class is used for like 9 textures and as you can see I have it setup so I can use it for multiple blocks. I have this setup for my items and things and it works fine, so im not sure what the deal is. Hope you can help, thanks!

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.