Ars Nouveau

Ars Nouveau

49M Downloads

Shears Duplication using Cut Spell

ssblur opened this issue ยท 5 comments

commented

Issue description

When using Projectile > Cut on an Arcane Pedestal, Shears are placed on the pedestal.

Steps to reproduce the issue

  1. Create a Projectile > Cut spell.
  2. Stand outside block interaction range of the pedestal.
  3. Cast your spell.

What's the expected result?

Nothing happens

What's the actual result?

Shears are placed on the pedestal.

Notes

  • On version ars_nouveau-1.16.4-1.11.6, in the Enigmatica 6 modpack version 0.4.3.
  • This issue seems to be replicable with any block which accepts an item into its inventory via right click, presumably because this spell directly simulates a right click with shears.
commented

If anything, Cut should probably work like Break when striking a block, only with shears instead of a pick as the basis tool. The "use shears" behavior only makes sense when applied to entities, unless there is some kind of block that can be snipped without breaking it I'm unaware of.

commented

As far as I can tell, vanilla naturally clones the itemstack with its internal stack splitting methods, which is what the pedestals, and other mods use to take an item from the inventory. I don't believe there is actually a way to still maintain a reference to the item once it has been inserted into a block.

Deleting it on item tick would be a good solution for stopping the duping, but it could still unfortunately clog block inventories.

commented

Vanilla has pumpkin. As for other mods, I have checked Mystical Agriculture and Boold Magic, their implementations are so vary from Ars Nouveau one that I don't think there is a simple way to fix duplication in all mods.

commented

You could do a check in EntityProjectileSpell::onHit for wether the impacted block has an inventory or something similar, and if it does, you stop the spell effect from resolving its effect.
(didn't really check much of the code just the mentioned entity class, so sorry if its a stupid suggestion :D )

commented

Maybe make a magic shear that can only be used by ANFakePlayer, and make it self-destroy after entered someone's inventory