Jump to content

Trouble in texture town


Recommended Posts

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);







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;




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");




Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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