Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Custom ID Start
The update for 1.13 is being worked on - please be patient. (Updated 02/19/19)
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
RoyalReject

Custom ID Start

Started by RoyalReject, November 29, 2018

9 posts in this topic

RoyalReject    0

RoyalReject

RoyalReject    0

  • Tree Puncher
  • RoyalReject
  • Members
  • 0
  • 27 posts
  • Report post
Posted November 29, 2018

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

Share this post


Link to post
Share on other sites

Animefan8888    491

Animefan8888

Animefan8888    491

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 491
  • 4324 posts
  • Report post
Posted November 29, 2018
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.

Share this post


Link to post
Share on other sites

RoyalReject    0

RoyalReject

RoyalReject    0

  • Tree Puncher
  • RoyalReject
  • Members
  • 0
  • 27 posts
  • Report post
Posted November 29, 2018
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

Share this post


Link to post
Share on other sites

LexManos    1470

LexManos

LexManos    1470

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1470
  • 8365 posts
  • Report post
Posted November 29, 2018

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.

Share this post


Link to post
Share on other sites

RoyalReject    0

RoyalReject

RoyalReject    0

  • Tree Puncher
  • RoyalReject
  • Members
  • 0
  • 27 posts
  • Report post
Posted November 29, 2018
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 

Share this post


Link to post
Share on other sites

LexManos    1470

LexManos

LexManos    1470

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1470
  • 8365 posts
  • Report post
Posted November 29, 2018

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.

Share this post


Link to post
Share on other sites

RoyalReject    0

RoyalReject

RoyalReject    0

  • Tree Puncher
  • RoyalReject
  • Members
  • 0
  • 27 posts
  • Report post
Posted November 29, 2018 (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 November 29, 2018 by RoyalReject

Share this post


Link to post
Share on other sites

LexManos    1470

LexManos

LexManos    1470

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1470
  • 8365 posts
  • Report post
Posted November 29, 2018

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.

Share this post


Link to post
Share on other sites

diesieben07    6112

diesieben07

diesieben07    6112

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6112
  • 40239 posts
  • Report post
Posted November 29, 2018

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Drachenbauer
      [1.13.2] How do i setup a block propertys constructor in a blockbase?

      By Drachenbauer · Posted 19 minutes ago

      but i cannot look inside there, if i hover over my imports, who starts wich minecraft, i get a popup with message: and if i try to open such a class to look into it, i just get an more advanced info-vindow, that´s not a java-editor
    • amelisse
      [1.13.2] How Register Entity for new Snowball

      By amelisse · Posted 22 minutes ago

      I dev a new Snowball dirt i register item but i don't know how register ans declared this entityDirtBall? and how created entitype?     EntityDirtBall.class // // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package net.amelisse.craftland.tileentity.items; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityType; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Particles; import net.minecraft.util.DamageSource; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class EntityDirtBall extends EntityThrowable { public EntityDirtBall(World world) { super(EntityType.SNOWBALL, world); } public EntityDirtBall(World world, EntityLivingBase entity) { super(EntityType.SNOWBALL, entity, world); } public EntityDirtBall(World world, double x, double y, double z) { super(EntityType.SNOWBALL, x, y, z, world); } @OnlyIn(Dist.CLIENT) public void handleStatusUpdate(byte b_) { if (b_ == 3) { for(int lvt_2_1_ = 0; lvt_2_1_ < 8; ++lvt_2_1_) { this.world.spawnParticle(Particles.ITEM_SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); } } } protected void onImpact(RayTraceResult p_70184_1_) { if (p_70184_1_.entity != null) { int lvt_2_1_ = 0; if (p_70184_1_.entity instanceof EntityBlaze) { lvt_2_1_ = 3; } p_70184_1_.entity.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)lvt_2_1_); } if (!this.world.isRemote) { this.world.setEntityState(this, (byte)3); this.remove(); } } }  
    • Drachenbauer
      Error with block registration

      By Drachenbauer · Posted 30 minutes ago

      but if i start the properties for the ItemBlock with (Item.Properties. in ItemInit.ITEMS.add(new ItemBlock(this, null).setRegistryName(this.getRegistryName())); instead of "null" in my block class, the dropdown-menu holds only the options: -class:Class<net.minecraft.item.Item.Properties> -super -this   for Block properties in the blockinit it will show me things like material, sound or hardness/resistance
    • Kemanorel
      [1.12.2] Bit of help with removing baby zombies?

      By Kemanorel · Posted 38 minutes ago

      Myself and the group I play with heavily dislike baby zombies so I decided to try to remove them. However, whenever I test it by spawning a bunch of zombies, I still get a few babies in there. This is the code being used.  
    • Cadiboo
      [1.12.2] Waiting a few seconds.

      By Cadiboo · Posted 38 minutes ago

      I think blocks can have a callback when they’re placed. Look at the fire block 
  • Topics

    • Drachenbauer
      7
      [1.13.2] How do i setup a block propertys constructor in a blockbase?

      By Drachenbauer
      Started Tuesday at 05:16 PM

    • amelisse
      0
      [1.13.2] How Register Entity for new Snowball

      By amelisse
      Started 23 minutes ago

    • Drachenbauer
      13
      Error with block registration

      By Drachenbauer
      Started Tuesday at 09:50 PM

    • Kemanorel
      0
      [1.12.2] Bit of help with removing baby zombies?

      By Kemanorel
      Started 38 minutes ago

    • heyitsmenobodyy
      5
      [1.12.2] Waiting a few seconds.

      By heyitsmenobodyy
      Started 2 hours ago

  • Who's Online (See full list)

    • amelisse
    • BeardlessBrady
    • Ugdhar
    • DavidM
    • Keksuccino
    • Drachenbauer
    • LexManos
    • Kemanorel
    • WilliHay
    • trexxet
    • MORIMORI0317
    • FloppyGaming
    • KonanTheRabbit
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Custom ID Start
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community