Posted August 29, 201312 yr I was wondering if there was a way to make item ids stay what you. //Certus Ingot public final static Item certusOrb = new CertusOrb(6101); int certusOrbID = certusIngot.itemID; In this item, I set the id to "6101". In game, it switches around. Is there anyway to fix this? -Phase https://github.com/phase
August 29, 201312 yr 1) You should ALWAYS grab the ID from the item/block instance DO NOT cache it. That's just asking for trouble. 2) It's setting it to 6357 as items are shifted by 256. There is nothing to fix, this is how minecraft works. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
August 29, 201312 yr Author 1) You should ALWAYS grab the ID from the item/block instance DO NOT cache it. That's just asking for trouble. 2) It's setting it to 6357 as items are shifted by 256. There is nothing to fix, this is how minecraft works. What do you mean by "You should ALWAYS grab the ID from the item/block instance"? https://github.com/phase
August 29, 201312 yr int certusOrbID = certusIngot.itemID; Don't do that, ALWAYS use certusIngot.itemID ALWAYS. It is better to centralize the id to one single place. So that if it DOES ever change you dont have to find all the p[lace where you have 'magic numbers' and fix them. Seriously, like 100 hunks in Forge are simply changing Mojang's hardcode of 'air' from 0 to something less magic number. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
August 29, 201312 yr Author int certusOrbID = certusIngot.itemID; Don't do that, ALWAYS use certusIngot.itemID ALWAYS. It is better to centralize the id to one single place. So that if it DOES ever change you dont have to find all the p[lace where you have 'magic numbers' and fix them. Seriously, like 100 hunks in Forge are simply changing Mojang's hardcode of 'air' from 0 to something less magic number. Where do you put int certusOrbID = certusOrb.itemID; ? And I meant to put "certusOrb.itemID;" not certusIngot. https://github.com/phase
August 29, 201312 yr Where do you put int certusOrbID = certusOrb.itemID; ? You don't Do NOT store item ids like that. Anyways, not here to tech coding. There is no bugs or anything here. So, end of thread. Please learn the structure of minecraft. 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.