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

2MsA7.png

 

I dont know What To do Any Help?

(i have made my own texture and put it in the right place)

 

package net.minecraft.src;



import Hayhay.generic.CommonProxy;
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;


/*
* Basic needed forge stuff
*/
@Mod(modid="Hayhaycrusher",name="Haymods",version="1.0.0")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)



public class mod_haymods {


//Telling forge that we are creating these
public static Block GreenBrickBlock;
public static Item RodItem;

@SidedProxy(clientSide="Hayhay.generic.client.ClientProxy", serverSide="Hayhay.generic.CommonProxy")
public static CommonProxy proxy;




//Declaring Init
@Init
public void load(FMLInitializationEvent event){

	//declaring these 
	GreenBrickBlock = new BlockGreenBrick(3360,1).setBlockName("GreenBrickblock").setHardness(1F).setResistance(5F);
	RodItem = new ItemRod(3361).setItemName("RodItem").setIconIndex(1);

	//Registering Block
	GameRegistry.registerBlock(GreenBrickBlock);

	//Adding ItemName
	LanguageRegistry.addName(GreenBrickBlock, "GreenBrick");
	LanguageRegistry.addName(RodItem, "Rod");


	proxy.registerRenderers();
}

}

 

 

package net.minecraft.src;

public class BlockGreenBrick extends Block{
public BlockGreenBrick(int par1, int par2){
	super(par1, par2, Material.rock);
	this.setCreativeTab(CreativeTabs.tabBlock);

}

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


}

 

package Hayhay.generic;

public class CommonProxy {
public static String ITEMS_PNG = "/Hayhay/mod/items.png";
public static String BLOCK_PNG = "/Hayhay/mod/Blocks.png";

// Client stuff
public void registerRenderers () {

}
}

 

 

package Hayhay.generic.client;

import net.minecraftforge.client.MinecraftForgeClient;
import Hayhay.generic.CommonProxy;

public class ClientProxy extends CommonProxy {
public void registerRenderers () {
	MinecraftForgeClient.preloadTexture(ITEMS_PNG);
	MinecraftForgeClient.preloadTexture(BLOCK_PNG);
}
}

 

 

 

For whatever reason, your texture is not being registered. I would try moving the MinecraftForgeClient.preloadTexture() calls into your main mod class' init() method. And make absolutely sure that your textures are in the right place and named correctly.

hayhaycrusher:

1) Don't use the minecraft namespace.

2) Don't SCREAM IN BOLD AND LARGE FONT!

3) Try recompiling, reobfuscating and testing on a production minecraft?

drinfernoo:

Hell no, NEVER put client-only stuff in the mod's main class.

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

drinfernoo:

Hell no, NEVER put client-only stuff in the mod's main class.

 

Oh? So should the client stuff go in the client proxy?

drinfernoo:

Hell no, NEVER put client-only stuff in the mod's main class.

 

Oh? So should the client stuff go in the client proxy?

Yes.

 

And you're not even telling the client that it even has a texture index...

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

If you're running it out of eclipse are you putting the .png's in the minecraft.jar in the "bin" folder located in the "jars" folder in your MCP area? And have you made sure you've got the directories exactly right? So you'd have a "Hayhay" folder inside the .jar and inside that a "mod" folder and finally the items.png in there?

I know you said it, but are you 100% positive?

Also, what scenario are you running it under? re-obfuscating it and putting it in the mods folder of your minecraft client? Just hitting the run button on eclipse?

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.