Jump to content

Recommended Posts

Posted

Is there a way to set the item registration to start at an id so the ids are lined up instead of spread out like i have my starting at of one item at 4096 through 4097 then it goes to 4184 i wanted all my items to have similar ids

Posted
8 minutes ago, RoyalReject said:

Is there a way to set the item registration to start at an id so the ids are lined up instead of spread out like i have my starting at of one item at 4096 through 4097 then it goes to 4184 i wanted all my items to have similar ids

They should be lined up in the order you register them. There is no way to control the numerical Id. And you shouldn't be dealing with them anyways.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
57 minutes ago, Animefan8888 said:

They should be lined up in the order you register them. There is no way to control the numerical Id. And you shouldn't be dealing with them anyways.

Is there a reason then my numbers are not lined up another mod is loaded and for some reason it first item starts at 4098 and mine starts at the 4096 and then skips to 4184

Posted

there could be quite a few reasons, notably that others may have those ids already.

However, why does it matter?

You as both a modder, and a user should not care about numerical IDs, so... don't.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
2 minutes ago, LexManos said:

there could be quite a few reasons, notably that others may have those ids already.

However, why does it matter?

You as both a modder, and a user should not care about numerical IDs, so... don't.

The way items are show in the menu and in jei and stuff make it here my items are not together and its just a personal preference and i thought you used to be able to set where it first starts assigning ids 

Posted

JEI *should* sort things by modid or something other then numerical ID {which is the default sort of the registry, cuz Mojang felt like doing it that way} But JEI doesn't have to do it that way.

Also, for creative inventory, use your own tab and group them that way.

You USED to have to assign all ids, and there were id conflicts all over the dang place.

This is one of the main reasons why things were moved to hiding the ids from you. You shouldn't need them anymore.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted (edited)

I do have them in a custom creative tab just for some reason it registers one block then some items and then the second block last separating them. In the image the second collector is way off

 

@SubscribeEvent
	public static void registerModels(ModelRegistryEvent evt) {
		
		registerBlock(ObjectHandler.collectorMK4);
		registerBlock(ObjectHandler.collectorMK5);
		//registerBlock(ObjectHandler.collectorMK6);
		
		//Items that have different properties or textures per meta value.
		//registerFuels();
		
		registerMatter();
		
		
	}

and thats the code i use so idk why they are not registered next to eachother

 

Does the same when they are the only things being registered

2018-11-29_00.37.07.png

2018-11-29_00.40.51.png

2018-11-29_00.40.52.png

Edited by RoyalReject
Posted

delete your world and rerun it.

Most liekly its because you've swapped registration order so many times in dev that it saved the ids out of order.

Thats the entire point of Forge tho, to control the IDS and manage them.

There isn't a good way to sort the items, and honestly it shouldn't be that big of a deal.

And we can't change how they are sorted in Forge because people complain in vanilla.

 

So, just to reiterate, the items/blocks WILL be assigned ids in the order they are registered.

This registration order persists between world loads.

So if V1 of your mod registers BlockA Item1 Item2

And V2 registers BlockA BlockB Item1 Item2 Item3

The result of upgrading the world would be BlockA Item1 Item2 BlockB Item3.

BUT in a new world it'll be BlockA BlockB Item1 Item2 Item3

And no, there isn't anything you can do about this.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.