Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

I believe the path is relative to src/common. For example, this is the path to my texture in my project: "/Mole/common/resources/terrain.png"

 

I put it in src/common/Mole/common/resources/terrain.png. Try putting it in src/common/graphics/test1.png instead

 

 

  • Author

I made a new folder at 'src' called common, i've put the test1.png in it, but it's still not working. I keep getting the Ocean colored Cube :(

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

 

ლ(́◉◞౪◟◉‵ლ

  • Author

1) do your blocks have tO be 256x256?

2) i made my texture on that purple pink thing with a size of 16 x16, is that wrong ?

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.