VazkiiMods / Botania

A tech mod for Minecraft themed around the magic of nature and plant life.
http://botaniamod.net/index.html
Other
1.25k stars 497 forks source link

Breaking Scaffolded Mana Spreaders in Creative drops Scaffolding #4652

Open anoomolu opened 1 month ago

anoomolu commented 1 month ago

Mod Loader

Both Fabric and Forge (I confirm that I have tested both loaders and will specify both loader versions below)

Minecraft Version

1.20.1

Botania version

1.20.1-444

Modloader version

Forge 47.2.0 / Fabric Loader 0.15.0, API 0.91.0

Modpack info

No response

The latest.log file

n/a

Issue description

As stated in the title, breaking a scaffolded mana spreader (gaia, regular, or any other version) in Creative drops Scaffolding. The expectation was that no block would be dropped.

Steps to reproduce

No response

Other information

No response

TheRealWormbo commented 1 month ago

Are wool covers also dropped this way?

anoomolu commented 1 month ago

Yep, just checked.

artemisSystem commented 3 days ago

Not actually sure how to fix this. We don't seem to have access to the player in the method that drops the scaffolding: https://github.com/VazkiiMods/Botania/blob/3aae22a612fbb58d9cd26ce79a8d248159787c38/Xplat/src/main/java/vazkii/botania/common/block/mana/ManaSpreaderBlock.java#L240

TheRealWormbo commented 1 day ago

I made a note to flatten covered spreader variants into block types and moving the scaffolding flag to a block state property for the 1.21 port. That way we can just use loot tables for these two things. (In addition to other benefits, such as marking the covered spreaders as dyed to a certain color via block tag, or having them occlude vibrations.) Won't change that the lens item will be dropped, but that one's probably special as it's actually stored as the item stack.

artemisSystem commented 1 day ago

The scaffolding is already a block state property, i'm pretty sure. But yeah, that does sound good