Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package init;
- import com.Dr_Blockenstein.MoreFood.Reference;
- import items.ItemRawbacon;
- 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 net.minecraftforge.registries.IForgeRegistryEntry;
- public class ModItems {
- // this is raw bacon
- public static Item rawbacon;
- public static void init() {
- rawbacon = new ItemRawbacon();
- }
- // the lines below this have the problem in .register
- public static void register() {
- GameRegistry.register(rawbacon);
- }
- public static void registerRenders() {
- registerRender(rawbacon);
- }
- private static void registerRender(Item item) {
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
- // this line is not in the code but the code above this with the Minecraft.getMinecraft is one line in eclipse.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement