squeek502 / WailaHarvestability

Minecraft mod that adds required harvest level and the effective tool to Waila tooltips of harvestable blocks
The Unlicense
17 stars 21 forks source link

GregTech ores not showing correct harvest level #28

Closed squeek502 closed 8 years ago

squeek502 commented 9 years ago

From IRC:

<SoundLogic> WAILIA harvestability lists them as harvistable and doesn't list a harvest level

LemADEC commented 8 years ago

Issue seems to be still live. Any idea what's causing it?

squeek502 commented 8 years ago

I would assume GregTech uses it's own harvest level code rather than the Forge methods. Will need to look into it more.

Blood-Asp commented 8 years ago

GT ores are TileEntitys to save 32000 different ores in one block id. The Harvestlevel is saved as Block meta: https://github.com/Blood-Asp/GT5-Unofficial/blob/master/src/main/java/gregtech/common/blocks/GT_Block_Ores.java#L135 The block meta is set on placement: https://github.com/Blood-Asp/GT5-Unofficial/blob/master/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java#L33

squeek502 commented 8 years ago

Much appreciated @Blood-Asp. Will add support when I get the chance.

squeek502 commented 8 years ago

Turned out to be simpler than I thought; GregTech implements all the Forge methods properly, there was just some code for handling disguised blocks that was getting in the way (where the ItemStack provided by Waila differs from the block in the world), causing the actual block's metadata to be discarded. Committing a fix now.

LemADEC commented 8 years ago

Thanks!