Psi

Psi

45M Downloads

Place block trick does not respect custom ItemBlocks / does not read meta the right way

williewillus opened this issue ยท 1 comments

commented

Reference code: https://github.com/Vazkii/Psi/blob/e71bb7df89decaf978338028972a0a6ffd61f585/src/main/java/vazkii/psi/common/spell/trick/block/PieceTrickPlaceBlock.java#L94

This doesn't properly place blocks that have custom ItemBlocks that override ItemBlock.placeBlockAt() for custom placement logic

In addition, I think the proper way to go from item meta -> block meta is through Item.getMetadata(), according to its javadoc. There's some blocks whose item metas don't match their block metas. But that's irrelevant if that line was changed to use placeBlockAt, which will handle that automatically on its own.

Ironically and funnily enough, this was discovered because it fails to place Botania flowers (which have a custom ItemBlock.placeBlockAt that wasn't being called, causing the subtile to not be set properly. A bunch of people probably have the secret bugged flower achievement now xD)

commented

Fixed in 18