Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Trouble in texture town


MyNameIsSilver
 Share

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

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

}

}

 

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.