Jump to content

Recommended Posts

Posted

i have no idea why it is a GIANT purple and black checker box

 

i have all this and my item comes up like this in game https://gyazo.com/5710482d07d54657ec58492bc99f0aca

 

package snipernyc1.firsttime;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import snipernyc1.firsttime.init.AquaItems;
import snipernyc1.firsttime.proxy.CommonProxy;

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION)
public class snipermod {
@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
public static CommonProxy proxy;

@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	AquaItems.init();
	AquaItems.register();

}

@EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.registerRenders();
}

@EventHandler
public void postInit(FMLPostInitializationEvent event)
{

}
}

- main class

 

package snipernyc1.firsttime.init;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
import snipernyc1.firsttime.Reference;

public class AquaItems {

public static Item aqua_ingot;


public static void init(){
	aqua_ingot = new Item().setUnlocalizedName("aqua_ingot");

}

public static void register(){
	GameRegistry.registerItem(aqua_ingot, aqua_ingot.getUnlocalizedName().substring(5));
}

public static void registerRenders(){
	registerRender(aqua_ingot);
}
public static void registerRender(Item item){
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5),"Inventory"));
}
}

- items class

 

package snipernyc1.firsttime.init;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
import snipernyc1.firsttime.Reference;

public class AquaItems {

public static Item aqua_ingot;


public static void init(){
	aqua_ingot = new Item().setUnlocalizedName("aqua_ingot");

}

public static void register(){
	GameRegistry.registerItem(aqua_ingot, aqua_ingot.getUnlocalizedName().substring(5));
}

public static void registerRenders(){
	registerRender(aqua_ingot);
}
public static void registerRender(Item item){
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5),"Inventory"));
}
}

- the basic rendering thing

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.