Jump to content

Recommended Posts

Posted

Heyho,

 

I have 2 questions:

1. Does Minecraft still have an ID limit for Blocks and Items?

 

2. How is it possible to handle one block as different blocks for the assets like Minecraft does with its Logs?

 

Thanks in Advance!
as Minecraft Source didn't tell me anything about that :/

Posted
12 minutes ago, diesieben07 said:

Yes.

Thanks but do you know how high it is?

12 minutes ago, diesieben07 said:

Take a look at IStateMapper.

Thanks exactly what I was searching for ^^

Posted
5 minutes ago, JTK222 said:

do you know how high it is?

 

IIRC, 4096 for Blocks and, ~32000 for Items.

  • Like 1

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
2 hours ago, JTK222 said:

Thanks but do you know how high it is?

 

The fields at the top of the GameData class hold the minimum and maximum IDs for the vanilla registries, i.e. Blocks, Items, Potions, Biomes, SoundEvents, PotionTypes, Enchantments and Entities.

  • Like 1

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.

Posted
3 hours ago, larsgerrits said:

IIRC, 4096 for Blocks and, ~32000 for Items.

Is this per Mod like with Entities? As all of my blocks are already above 4096.

 

1 hour ago, Choonster said:

 

The fields at the top of the GameData class hold the minimum and maximum IDs for the vanilla registries, i.e. Blocks, Items, Potions, Biomes, SoundEvents, PotionTypes, Enchantments and Entities.

Oh that's quite useful tahnk you ^^

Posted (edited)
6 minutes ago, JTK222 said:

Is this per Mod like with Entities? As all of my blocks are already above 4096.

 
 

No, this is the complete total of the game. May I ask why you are using that much Block IDs? Note: if you are talking about the IDs in your inventory, they are the IDs of the ItemBlocks, which are Items.

Edited by larsgerrits

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted (edited)

Long story :P I am often anoyed by the missing block variants to wood, like an spruce workbench.

And as my mod adds a bunch of decorative things I am using currently already around 200 ID's D: And as it looks I will need do decrease this as I am planning on adding at least 500 blocks more, wood variants not count into these.

But thank you for the help ^^

Edit: Oh and some blocks are so complex that they require multiple seperate blocks so they don't destroy the performance to extremely :/

Edited by JTK222
Posted

Just be sure to use metadata/blockstates, and not every variant it's own ID. This will significantly decrease the amount of IDs you use.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Comp-sci for the curious: Each block position in the world gets a 2-byte (16-bit) integer to tell what it is. 4 bits are the metadata, and 12 bits are the ID. That gives you the ranges 0-15 for metadata and 0-4095 for block ID within which we must work.

 

I 2nd the motion to use metadata wherever you create sets of blocks by color or wood or any other simple parameter. Otherwise those bits go to waste.

  • Like 1

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.