Blue Power

Blue Power

4M Downloads

[1.15.2] Grass Conflict with shears

imakunee opened this issue ยท 5 comments

commented

What were you doing when the issue happened?

Yanny's Stone Age includes Bone Shears. With just Yanny's Stone Age installed the shears function normally. With Blue Power also installed, they no longer function however normal shears still function normally.

What did you expect to happen?

Bone Shears would provide a Grass block when broken.

What happened instead

Grass acted as if I had used my fist to break it.

Full Log and Crashlog on pastebin/gist

N/A

Forge and Minecraft version

Minecraft 1.15.2
Forge 31.1.17

Bluepower version and build number

bluepower-1.15.2-0.4.184-alpha-universal.jar
stone-age-1.15.2-1.1.2.jar

###Additional Information###
Also posted to Yanny's Stone Age issues.

commented

I'll check if this works correctly for vanilla shears, is just that I'm adding flax to the grass loot table if it is working correctly with vanilla shears sounds like more of an issue on the other mods side, but see what I can do.

commented

Yes, it is caused by modifying loot table of tall grass. My mod also modify same file to make custom shears working. Basically I changed "item": "minecraft:shears" by "tag": "ages_api:shears".

But this is more general problem, because there is no other easy way to made custom shears working.

I also created suggestion for this change right into forge, but who knows when it will be implemented (MinecraftForge/MinecraftForge#6514)...

I think that we can made it right for future and we both create tag in forge/tags/items/shears.json with content:
{ "replace": false, "values": [ "minecraft:shears" ] }
and for your changed loot table you use as shear tool:
"tag": "forge:shears"

What do you think?

commented

@yanny7 Yeah sound's good, I've added the tag "forge:shears" on Blue Power's side. Thanks.

commented

I look more into our problem and find out that there is also better solution when you add another pool into loot table: https://www.minecraftforge.net/forum/topic/61098-1112-how-do-i-add-additional-loot-to-vanilla-chests/?do=findComment&comment=285791 - examle https://github.com/Vazkii/Botania/blob/e38556d265fcf43273c99ea1299a35400bf0c405/src/main/java/vazkii/botania/common/core/loot/LootHandler.java

Because there is still problem that each time forge finds resource with same name, this resource is replaced, not merged. Do merge in code and have configuration for it is more clean solution I think.

Note also which resource with same name will be used is not clear, some time ago I find out that this order is random, based on modid. In my case forge was rewriting my own changes

commented

Yeah It's not the best solution I'll look further into it, last I tried there was an open PR to make the registry accessible from forge but I'll follow it up.