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

...code?

Also, 1.8 is ancient. If you want to use 1.8, at least use 1.8.9

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.

  • Author
24 minutes ago, Draco18s said:

...code?

Also, 1.8 is ancient. If you want to use 1.8, at least use 1.8.9

ture but i want to make my mods available for many version plus people use 1.7.10 and 1.10 allot still so my plan was to update my mods from 1.7 to 1.8 to 1.9 ect. 

code(do you only need the item code?):

package mysticmyles.Anime_Dekokurafuto.init;

import mysticmyles.Anime_Dekokurafuto.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class AnimeItems {
	
	public static Item uchiha_logo_item;
	public static Item yugioh_cardback_item;
	public static Item dragon_ball_logo0_item;
	
	public static void init() {
		uchiha_logo_item = new Item().setUnlocalizedName("uchiha_logo_item");
		yugioh_cardback_item = new Item().setUnlocalizedName("yugioh_cardback_item");
		dragon_ball_logo0_item = new Item().setUnlocalizedName("dragon_ball_logo0_item");
	}
	
	public static void register()
	{
		GameRegistry.registerItem(uchiha_logo_item, uchiha_logo_item.getUnlocalizedName().substring(5));
		GameRegistry.registerItem(yugioh_cardback_item, yugioh_cardback_item.getUnlocalizedName().substring(5));
		GameRegistry.registerItem(yugioh_cardback_item, dragon_ball_logo0_item.getUnlocalizedName().substring(5));
	}
	public static void registerRenders()
	{
		registerRender(uchiha_logo_item);
		registerRender(yugioh_cardback_item);
		registerRender(dragon_ball_logo0_item);
	}
	
	public static void registerRender(Item item)
	{
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
	}
}

 

6 minutes ago, TheMysticMinecart Myles said:

GameRegistry.registerItem(yugioh_cardback_item, yugioh_cardback_item.getUnlocalizedName().substring(5)); GameRegistry.registerItem(yugioh_cardback_item, dragon_ball_logo0_item.getUnlocalizedName().substring(5));

Looks like you're registering yugioh_cardback_item twice.

 

I'm guessing copy & paste are to blame.

  • Author
6 minutes ago, Ugdhar said:

Looks like you're registering yugioh_cardback_item twice.

 

I'm guessing copy & paste are to blame.

wait what 0.0,

omg i am so stupid XD wow that was a dumb mistake on my part.... well that's embarrassing 

i guess this is solved oops  

Also, don't set the registry name to the unlocalized name. Set the unlocaled name to the registry name. Unlocalized names should be used for displaying the item's name only.

 

Problematic Code #7

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.

  • Author
18 minutes ago, Draco18s said:

Also, don't set the registry name to the unlocalized name. Set the unlocaled name to the registry name. Unlocalized names should be used for displaying the item's name only.

 

Problematic Code #7

so do i just do it like it's done in (1.7.10 the unlocalized name) and how different is 1.8.9 to 1.8

item.setUnlocalizedName(item.getRegistryName().toString());

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.

item is a local variable. So no, your code there won't work.

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.

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.