Enigmatica6 icon indicating copy to clipboard operation
Enigmatica6 copied to clipboard

Soft Coating from BloodMagic not works with Spawners

Open dawidmachon opened this issue 2 years ago • 13 comments

Modpack Version

1.3.0

Describe your issue.

Soft Coating (silk touch) from BloodMagic not works with Spawners. When you try pickup spawner, it is destroyed. If Im not wrong Apotheosis making here ability to pickup spawners with silk Touch.

Crash Report

No response

Latest Log

No response

Have you modified the modpack?

No

User Modifications

No response

Did the issue happen in singleplayer or on a server?

Server

dawidmachon avatar Jun 12 '22 23:06 dawidmachon

I believe Apotheosis only allows Pickaxes with Silk Touch held by players to break spawners and get it as a drop - I'll look into adding a tooltip to spawners clarifying this.

NielsPilgaard avatar Jun 13 '22 12:06 NielsPilgaard

ars nouveau's silk touch (break + pickup) works tho

Quezler avatar Jun 13 '22 12:06 Quezler

@NielsPilgaard but this Silk Coating is apllied on pickaxe itself. And on Pickaxe there is 'buff'. So in general and in end you holding in hand pickaxe and breaking.

dawidmachon avatar Jun 13 '22 12:06 dawidmachon

Myeah, it's very similar to Silk Touch, but it isn't Silk Touch :P

NielsPilgaard avatar Jun 13 '22 17:06 NielsPilgaard

@Shadows-of-fire Hey there 👋 Is it intentional that only a few Silk Touch methods don't destroy spawners when broken, or is it lack of compat perhaps?

NielsPilgaard avatar Jun 13 '22 17:06 NielsPilgaard

This is the only check for silk touch that is permissible, so if BM's "silk coating" doesn't pass this check, it doesn't count as "real" silk touch (and then they would be responsible for making it act "real" through external means).

https://github.com/Shadows-of-Fire/Apotheosis/blob/1.16/src/main/java/shadows/apotheosis/spawn/spawner/ApothSpawnerBlock.java#L73

GitHub
All things that should have been. Contribute to Shadows-of-Fire/Apotheosis development by creating an account on GitHub.

Shadows-of-Fire avatar Jun 13 '22 18:06 Shadows-of-Fire

In tooltip for Soft Coating -> there is clear statement it gives silk Touch ;P So maybe they need to apply proper config there ;P

dawidmachon avatar Jun 13 '22 21:06 dawidmachon

We added that tooltip. Though it's based on the description in the book.

MuteTiefling avatar Jun 13 '22 21:06 MuteTiefling

Relayed

MuteTiefling avatar Jun 13 '22 22:06 MuteTiefling

Adding to the discussion here. I think there's only two (plus one) ways that "Soft Coating" will be able to work with the Apotheosis spawners. Currently, BM adds the Silk Touch functionality by implementing and registering a GlobalLootModifier - in this, when a harvesting item with Soft Coating breaks a block, it regenerates the LootTable as if the tool that was used had the Silk Touch enchantment on it. This is shown here:

https://github.com/WayofTime/BloodMagic/blob/6980c2279a89efd2d35384c9100255f030c8f6c9/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java#L50

The first option would be for Apotheosis to implement a LootModifier that will check the used tool to see if it has the Silk Touch enchantment and then add the appropriate spawner block ItemStack to the returned generated list. A possible issue with this would be that the check for applying extra damage to the harvesting tool would need to be moved or re-thought, since Loot Tables aren't guaranteed to use the actual harvesting tool.

The second option would be reworking "Soft Coating" through a mixin to have "EnchantmentHelper.getItemEnchantmentLevel" actually return a different value when Soft Coating is applied. This... is not ideal, and would probably cause many unintended side-effects that are probably best left unexplored.

The magical third option is: a wizard did it. Either through a text guide or a tooltip somewhere in Apotheosis or the modpack, indicate that "due to the arcane construction that allows creatures to be spawned infinitely through the ether, only a pickaxe that has been similarly attuned to arcane systems are able to properly remove a mob spawner without breaking it." In short, only the vanilla enchantment will work.

Welcome to hear your opinions!

GitHub
The place where all of my mod stuffs is! Contribute to WayofTime/BloodMagic development by creating an account on GitHub.

WayofTime avatar Jun 14 '22 01:06 WayofTime

I'm wondering how Tcon does it, or if their picks work (because they've also been psuedo-enchanted)

Shadows-of-Fire avatar Jun 14 '22 01:06 Shadows-of-Fire

ars nouveau's silk touch (break + pickup) works tho

or this one ;)

dawidmachon avatar Jun 14 '22 14:06 dawidmachon

Adding to the discussion here. I think there's only two (plus one) ways that "Soft Coating" will be able to work with the Apotheosis spawners. Currently, BM adds the Silk Touch functionality by implementing and registering a GlobalLootModifier - in this, when a harvesting item with Soft Coating breaks a block, it regenerates the LootTable as if the tool that was used had the Silk Touch enchantment on it. This is shown here:

https://github.com/WayofTime/BloodMagic/blob/6980c2279a89efd2d35384c9100255f030c8f6c9/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java#L50

The first option would be for Apotheosis to implement a LootModifier that will check the used tool to see if it has the Silk Touch enchantment and then add the appropriate spawner block ItemStack to the returned generated list. A possible issue with this would be that the check for applying extra damage to the harvesting tool would need to be moved or re-thought, since Loot Tables aren't guaranteed to use the actual harvesting tool.

The second option would be reworking "Soft Coating" through a mixin to have "EnchantmentHelper.getItemEnchantmentLevel" actually return a different value when Soft Coating is applied. This... is not ideal, and would probably cause many unintended side-effects that are probably best left unexplored.

The magical third option is: a wizard did it. Either through a text guide or a tooltip somewhere in Apotheosis or the modpack, indicate that "due to the arcane construction that allows creatures to be spawned infinitely through the ether, only a pickaxe that has been similarly attuned to arcane systems are able to properly remove a mob spawner without breaking it." In short, only the vanilla enchantment will work.

Welcome to hear your opinions!

I like option 1, I can live with option 3 😄

GitHub
The place where all of my mod stuffs is! Contribute to WayofTime/BloodMagic development by creating an account on GitHub.

NielsPilgaard avatar Jun 14 '22 17:06 NielsPilgaard