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

A few years ago I made minecraft mods, then I quit. I come back to see that on the new 1.10 forge registerItem has been deprecated. I do not at all understand how the new registry system works. Can someone help me?

There are 10 types of people in this world. Those who know binary and those who don't.

The deprecated

GameRegistry

methods tell you their replacements in their doc comments.

 

The registration process is the same for any

IForgeRegistryEntry

implementation (e.g.

Block

,

Item

,

Biome

):

  • Call
    setRegistryName

    to set the registry name of the object

  • Call
    GameRegistry.register(IForgeRegistryEntry)

    to register it

 

The main change from the old system is that

GameRegistry.register

won't create an

ItemBlock

for your

Block

, you need to create and register it yourself.

 

Some older tutorials will tell you to use the unlocalised name as the registry name or model location, don't do this. Registry names are IDs, they must be unique and can't change. Unlocalised names are only for translation/display purposes, don't have to be unique and may change at any time. The default model loaded for every

Item

is the one with its registry name, so use this as the default model location for your items.

 

If the registry and unlocalised names of an object are the same, set the registry name and then set the unlocalised name to the registry name (

setRegistryName("foo"); setUnlocalisedName(getRegistryName());

). This has the benefit of including your mod ID in the unlocalised name, preventing localisation conflicts with other mods. If the unlocalised name changes later on, set it separately instead of using the registry name.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Where are you now supposed to set the in-game name for the Item? I seem to have pretty much all the things in place, but it is still displayed as item.epsetestmod.pocketCalculator.name

I have a

private final String name = "someName";

and a getter for it (getName). Also doesn't work with the

name

being public.

Read the docs they said. There no be docs :o

Where are you now supposed to set the in-game name for the Item? I seem to have pretty much all the things in place, but it is still displayed as item.epsetestmod.pocketCalculator.name

I have a

private final String name = "someName";

and a getter for it (getName). Also doesn't work with the

name

being public.

 

Nothing changed with regards to unlocalised and localised names, you still set the unlocalised name with

setUnlocalizedName()

and then defined the localised name in the .lang file. What version did you last mod in?

EDIT: read the IronChests source code. It works. What I saw is actually what is supposed to happen  :-X

 

Well, that thing is something I read somewhere. I already had this line:

this.setUnlocalizedName(name);

but I still don't get an in-game name for my Item.  ???

Read the docs they said. There no be docs :o

You need to create localization files in resources/asstets/modid/lang/

for your mod. where you specify unlocalizedName=Localized Name

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.