#Why does setting the contents of hopper not work?

1 messages · Page 1 of 1 (latest)

fast nacelle
#

instance is a Hopper Block State, and setContents apparently doesn't work because hopperItems has the correct items and everything but it doesn't update it, any ideas?

#

(Spigot API 1.19)

crystal jackal
#

have you tried debugging hopperItems

#

to ensure theyre correct

fast nacelle
#

I did

#

Did you read what I said?

crystal jackal
#

claiming that they have the correct items

#

i cant always verify that from random people on the internet

fast nacelle
#

they have I debugged it

crystal jackal
#

ok

fast nacelle
#

bruh

#

Any other ideas?

#

Why does setting the contents of hopper not work?

twin pebble
#

getInventory returns the live inventory of the block

#

getSnapshotInventory returns a "state" of it

fast nacelle
#

Bruh moment.

twin pebble
#

When you call update, the live inventory is overwritten by the snapshot inventory

#

Either don't call update or modify the snapshot inventory instead

fast nacelle
#

K