Jump to content

Custom texture help


Dus998

Recommended Posts

I am new to modding, i already have mcp and eclipse set up and i have a simple block

so my question is how do i make / use a custom texture and how do i set custom things like hardness and drops?

 

my code

 

test.common

 

package test.common;


import cpw.mods.fml.common.Mod;
import net.minecraft.src.Block;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "Dus998_TestMod" , name = "Test" , version ="0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class Test
{

public static Block TestBlock;
    
   
@Init
public void load(FMLInitializationEvent event)
 {
          TestBlock = new blockTestBlock(250, 0).setBlockName("TestBlock");
          
          
          GameRegistry.registerBlock(TestBlock);
          
          LanguageRegistry.addName(TestBlock, "Test Block");
 }



}

the block

package test.common;

import net.minecraft.src.Block;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Material;

public class blockTestBlock extends Block 
{

public blockTestBlock(int id, int texture)
    {


	super(id, texture, Material.cloth);
    	this.setCreativeTab(CreativeTabs.tabBlock);
        
    
    }






}

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