Jump to content

Block Texture Problem


ProxyCow

Recommended Posts

Hello

 

I'm new to Forge Modding (i modded alot with modloader), and i made a block called BlockTutorial. The code seems fine, and i got a texture for my block (Ocean blue colored stone). But, when i start up minecraft and i get in my world, the block is just a Ocean Blue cube without any textures. I experimented with other textures, and it is coloring the cube with the color of the texture:

 

width=180 height=102http://s12.postimage.org/w7z5wn79l/Minecraft_Forge_Problem.jpg[/img]

 

Block Texture:

 

iconforge.png

 

Can someone help me? Earlier, i had some problems with the white block with black dots in it. Im following the tut:

 

Code:

 

eerstemod.java

 

package eigenmod.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
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;
import eigenmod.client.ClientProxyTutorial;

@Mod(modid = "eerstemod", name = "eerstemod" , version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class eerstemod {

@SidedProxy(clientSide = "eigenmod.client.ClientProxyTutorial",
			serverSide = "eigenmod.common.CommonProxyTutorial")
public static ClientProxyTutorial proxy = new ClientProxyTutorial();

Block tutorialOre;
int tutorialOreID = 500;

@Init
public void load(FMLInitializationEvent event) {
	tutorialOre = new BlockTutorialOre(tutorialOreID, 1, Material.iron).setBlockName("Lars Ore ");

	gameRegisters();
	languageRegisters();

	proxy.registerRenders();

}

public void gameRegisters(){
	GameRegistry.registerBlock(tutorialOre);
}
public void languageRegisters(){
	LanguageRegistry.addName(tutorialOre, "Tutorial Ore");
}
}

 

ClientProxyTutorial.java

 

package eigenmod.client;

import net.minecraftforge.client.MinecraftForgeClient;
import eigenmod.common.CommonProxyTutorial;

public class ClientProxyTutorial extends CommonProxyTutorial{

@Override
public void registerRenders() {
        MinecraftForgeClient.preloadTexture("/graphics/test1.PNG");
}
}

 

CommonProxyTutorial.java

 

package eigenmod.common;

public class CommonProxyTutorial {

public void registerRenders(){

}
}

 

BlockTutorialOre.java

 

package eigenmod.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class BlockTutorialOre extends Block {

	public BlockTutorialOre(int id, int texture, Material mat) {
		super(id, texture, mat);
		this.setCreativeTab(CreativeTabs.tabBlock);
	}

	public String getTextureFile(){
		return  ("/graphics/test1.png");
	}
}

 

The folder where the texture is located: Eclipse: src > graphics > test1.png

 

Please help me!

Link to comment
Share on other sites

It may have something to do with the color hex multiplier

Or your picture file isn't 256x256

Or it's because you didn't do setBlockName which YOU MUST DO!!! Otherwise any new blocks you add will share the same properties

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

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.