GTNewHorizons / twilightforest

Twilight Forest repository
GNU Lesser General Public License v2.1
14 stars 20 forks source link

Twilight Forest somehow uses Block Metadata 49 for the Biome Dirt and Biome Grass layer. #57

Open GregoriusT opened 7 months ago

GregoriusT commented 7 months ago

Twilight Forest somehow uses Block Metadata 49 for the Biome Dirt and Biome Grass layer.

I got a report for a weird crash and noticed that a Block ID/Metadata extender caused Twilight Forests Biome Dirt and Biome Grass Layer in all of its Biomes to have MetaData 49.

Without the Block ID/Metadata Extender installed, it will turn into MetaData 1 thanks to a &15 sanity check, which is ALSO incorrect, as that makes Twilight Forests Dirt into Coarse Dirt, and Twilight Forests Grass into... Grass with an invalid Metadata value.

This might need some investigation or a simple Ctrl+F for the number 49 to replace it with a 0 inside some Biome related superclass in Twilight Forest.

I suspect it was just a mishap when trying to port the mod from the ID system to the "newer" block registry system in 1.7.10.

eigenraven commented 7 months ago

Looks like it's doing &255 instead of &15 here: https://github.com/GTNewHorizons/twilightforest/blob/master/src/main/java/twilightforest/biomes/TFBiomeBase.java#L396 https://github.com/GTNewHorizons/twilightforest/blob/master/src/main/java/twilightforest/biomes/TFBiomeBase.java#L398

GregoriusT commented 7 months ago

more importantly why the fuck is it doing a bitwise operation at all for this sorta stuff? Isnt it clear that dirt and grass need to have metadata zero? I am certain TF didnt intent to generate a Coarse Dirt Layer.