Jump to content

Whenever I Register an item GameRegistry.registerItem "registerItem" is crossed


StezeH

Recommended Posts

Whenever I Register an item GameRegistry.registerItem "registerItem" is crossed out and it would be appreciated if anyone could help

heres my code.

 

package com.StezeH.StezehsMod.init;

 

import com.StezeH.StezehsMod.client.Reference;

 

import net.minecraft.client.Minecraft;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class StezehsItems {

 

 

public static Item purple_glowstone_dust;

 

public static void init(){

purple_glowstone_dust = new Item().setCreativeTab(CreativeTabs.MATERIALS).setMaxStackSize(64).setUnlocalizedName("purple_glowstone_dust");

}

public static void register(){

GameRegistry.register(purple_glowstone_dust.setRegistryName(purple_glowstone_dust.getUnlocalizedName().substring(5)));

GameRegistry.registerItem(purple_glowstone_dust, purple_glowstone_dust.getUnlocalizedName().substring(5));

}

public static void registerRenders(){

registerRender(purple_glowstone_dust);

 

}

public static void registerRender(Item item){

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));

}

}

 

 

Link to comment
Share on other sites

Read the javadoc when you hover your mouse over the method.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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