iron431 / irons-spells-n-spellbooks

Other
78 stars 57 forks source link

[Bug] Alchemist Cauldron deletes items inserted with a hopper or dropper. #584

Closed Umber0010 closed 3 days ago

Umber0010 commented 2 weeks ago

Observed behaviour

Attempting to insert items into an alchemist cauldron with either a hopper or dropper will cause it to void the item that was first inserted into the cauldron, be it if said item was also put in autonomously or by hand.

If multiple items are inserted into the cauldron by hand, attempting to insert more will delete the first item placed in. For example, if Copper, Iron, and Gold ingots are inserted in that sequence, attempting to insert a shard of amethyst will void the iron ingot while leaving the others untouched. And further attempts to insert items will replace the amethyst shard, or whatever was last inserted.

This will only occur if the Cauldron is capable of accepting items. Placing 4 items into a cauldron by hand will prevent hoppers or droppers from being able to insert entirely.

Expected behaviour

Expectations is for the hopper to place all items it contains into the cauldron in sequence.

Steps to reproduce

  1. Place and Alchemist caldron and fill it with water.
  2. Place a hopper facing into the Alchemist Cauldron and place a redstone block beside the hopper to lock it.
  3. Fill the hopper with items the Alchemist cauldron can accept. This includes metal ingots, spell scrolls, or potion ingredients. It is recommended that different items are used to better visualize the issue.
  4. Break the redstone block powering the hopper and observe as hopper inserts it's items into the cauldron while deleting what is already in there.

Server Type

Single Player

Crashlog

No response

Iron's Spells N Spellbooks version

1.20.1-3.4.0 and 1.21-3.6.1

Forge version

Forge 1.20.1-47.3.0 and Neoforge 21.1.51

Other mods

No response

AlexanderChang140 commented 5 days ago

I am attempting to fix this bug; however I am not sure the reason why the getItem() function in the AlchemistCauldronTile is commented out. From the information given, I am assuming that only the vanilla hopper should be able to call this function. Would it be fine to uncomment it? Further clarification would be helpful @iron431.

iron431 commented 5 days ago

its probably fine. the issue is that it was returning empty for every index if there was a free slot, causing it to think indexes that werent empty could accept items

iron431 commented 3 days ago

fixed in 3.7.0/3.4.0.2