Block variants problem
Burnert opened this issue ยท 7 comments
I've noticed something really weird about some blocks.
They have correct textures and drop correct items, but when you pick a block in creative using middle mouse button, it doesn't give you the one which it should. Let's say I click on a nether lapis ore, I should get a lapis ore, but I get a coal ore.
Also what's odd, Hwyla says that the block is also not the one it should. It shows the same block I get when I pick it using mmb. What's even stranger is that it reports correct block states and metadata for each block, it just doesn't behave the way it should.
The other thing is that in the whole modpack, a good amount of ores are just labeled as < Unnamed > ERROR, and upon picking in creative mode crash the game.
I hovered over every block in the mod with HWYLA and used pick block on every block, they all returned correctly and didn't crash.
I made sure to test it with a rather large modpack (only a couple of months out of date).
See this gist for more info: https://gist.github.com/trabpukcip/e787bd161689b1717e36e69b44f20d89
Could I please get your neo version, forge version, some gists of you crash logs and a mod list (or modpack link)?
Forge version: 1.12.2-14.23.5.2854
NEO version: 1.12.2-1.4.1
Logs after picking block: https://gist.github.com/Burnert/62fb41009769c937d5418d6b405bffa3
Modpack link: https://www.technicpack.net/modpack/hhh-reloaded.1680483
I have also tested the mod with only Hwyla and nothing else on forge 2847, only the vanilla ores had the problem (showing as coal ore).
Variant 68? How the hell did that index get that high, blockstate variants top out at 15.
Did you test on a clean world?
Yes, I've just checked it again on a clean world and nothing has changed.
My friends also checked how it behaves on their end and it's the same thing.
I have no idea why the index is so high, it's value depends on which block I pick. I've seen it crash on 68, 65, 64.
I also checked the blocks with /tellme holding and lookingat, holding reports correct data on the bad blocks, whilst lookingat reports the same thing as Hwyla, giving an error on the ores.
I used /ct blockinfo too, and this one reports correct blocks and metadata values.
You have some sort of other mod interference.
All the ones that would generate errors are having their textures overwritten for a start.
I need to dig a bit deeper to narrow it down.
Looking at your config, the erroring blocks may match up to blocks that are set to drop items and not blocks.
I did pretty thoroughly test that function, I will have a closer look sometime this weekend.
I have been unwell but finally feeling better.
The issue has been nailed down to being an oversight in the block code.
Base minecraft/forge code uses damageDropped to return the block for getPickBlock.
My override for damageDropped so that item drops work as expected did not account for this.
I have now added an override for getPickBlock so it doesn't use damageDropped for my blocks.
The really high numbers that it was crashing with are indexes for where the block data is in the block data helper class.
This seems to fixed HWYLA weirdness as well.
Mod version 1.4.2 will be available soon on Curseforge.