Hardcoded Block ID limit
LadyCailinBot opened this issue ยท 9 comments
WORLDEDIT-3390 - Reported by spannerman79
Minecraft: 1.7.10
Forge: 10.13.4.1614
NotEnoughIDs: 1.4.2 ( http://minecraft.curseforge.com/projects/notenoughids/files/2275080 )
WorldEdit: any 6.0+ - including via http://builds.enginehub.org/job/worldedit/last-successful?branch=master
Related issue opened at: https://github.com/fewizz/NotEnoughIDs/issues/35
As WorldEdit has a hardcoded block id limit NEID doesn't work correctly. Usage of //regen or /replace x y fails if any block has an ID > 4095
Comment by wizjany
is this not a limitation of minecraft itself? idk how NEIDs works but world data stores a block as a byte + a nibble, 2^12-1=4095
Comment by spannerman79
What NEID does it extends the block limit. I am not a java programmer only way that I can compare is how the potion id limits can be increased via other mods NEID's increase that block ID limit from 4096 and upwards.
From what I can gather (i could be wrong) is that WorldEdit doesn't like a block with an ID > 4095, thus causing the issue.
Comment by wizjany
potion ids are completely unrelated, base ids are a short, while additional effects and complicated combinations are stored in nbt data, not on the item damage value...again, if mods are doing things that are not within the scope of the game itself, worldedit cant do anything about it anyway. the limit is a safety measure so people dont corrupt their worlds.
Comment by spannerman79
Fair enough @wizjany and I understand how some users need to have their hand to be held.
Is there any chance for a "hidden" config option to lift that safety limit for users like myself (and others) that do use NEID? For the record I keep Son-Father-Grandfather type backups, Son being every hour, Father being every day and Grandfather being every week.
Comment by wizjany
No, its hardcoded in worldedit for the same reason it is hardcoded in vanilla and forge and so on and so forth.
Comment by Thiana
@wizjany Are you sure this is still hardcoded in forge 1.8.9+? Using Forge 11.15.1.1763 with some mods (not NEID/etc) I'm seeing lots of mod blocks as 4096+ With a quick scan I've got blocks in the world going at least up to id 4832.
Comment by wizjany
I will say this again and again: Even if the hardcoded limit was raised in the forge registry (as of 1.8.9, no it's still not, dunno about 1.9), please open your mca region files in an nbt editor and tell me where the extra block id bits are. Because the world format still only allocates 12 bits per block which means we can still only store 4096 ids for blocks.
Comment by Thiana
@wizjany You're right about the region files. There is some sort of transformation being applied. From an example world, denseores:mc_emerald is id 639 in the block registry (level.dat) but id 4837 in the creative menu. denseores:mc_quartz is id 638 in registry, 4836 in creative menu. For biomesoplenty:ash_block the ids are 206/4104.
The end result is to use the modded blocks in game you have to get the id from the registry with an nbt editor since you cant do something like //set denseores:mc_emerald and //set 4837 fails with the limit message.