Enigmatica 6 - E6 - 1.16.5

Enigmatica 6 - E6 - 1.16.5

1M Downloads

Soft Coating from BloodMagic not works with Spawners

dawidmachon opened this issue 13 comments

commented

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

commented

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.
commented

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

commented

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.
commented

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

or this one ;)

commented

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.

commented

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

commented

@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.

commented

@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?

commented

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

commented

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

commented

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

commented

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.
commented

Relayed