Posted October 2, 201410 yr I am having problems setting the texture for my block, there is a spoiler below with the blocks code, please help as this is very frustrating. package mnis.kt.common; import org.lwjgl.util.Color; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent.Chat; public class BlockBOH extends Block { private EntityPlayer player; public BlockBOH(int par1, Material par2Material) { super(par1, par2Material); this.setCreativeTab(CreativeTabs.tabBlock); this.setLightValue(0.0F); this.setHardness(10); this.setResistance(10); } public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if (par1World.isRemote) { return true; } else { par5EntityPlayer.addChatMessage(EnumChatFormatting.DARK_GRAY + "[" + EnumChatFormatting.DARK_RED + "Healing Block" + EnumChatFormatting.DARK_GRAY + "]" + " You have been healed."); par5EntityPlayer.setHealth((float) 20.0F); System.out.println("Healing Block Used"); return true; } } public void registerIcons(IconRegister iconRegister) { blockIcon = iconRegister.registerIcon("mnis:boh"); } }
October 2, 201410 yr Author Check the following things: Is your ModID mnis ? Is your texture located at src/main/resources/assets/mnis/textures/blocks/boh.png ? Are your Blocks created and registered in preInit? Thank you for the help the problem was I accidentally made the assets folder in java instead of resources
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.