CoreProtect

CoreProtect

1M Downloads

Chiseled Bookshelves do not log interactions when auto fed by hopper.

pdebetta opened this issue ยท 4 comments

commented

I was testing chiseled bookshelf container interactions and it works great until you add a hopper feeding into the chiseled bookshelf. If a hopper is connected to a chiseled bookshelf then neither the interaction of removing an item nor the interaction of the item being replaced by the hopper is recorded.

From what I can tell from testing, no hopper interactions are recorded, and user interactions are not recorded if the chiseled bookshelf slot is immediately filled by a hopper.

My notes:

  • If the connected hopper is empty or if no hopper is connected to the chiseled bookself, the user interaction of removing a book (container action) is recorded as expected.
  • If the connected hopper contains any books and it refills the chiseled bookshelf when a user removes a book, the user interaction of removing a book (container action) is not recorded.
  • No hopper container interactions are recorded regardless of these interactions occurring when a user removes a book or if the hopper is refilled while the chiseled bookshelf has at least 1 empty slot.
commented

Additional notes: As a temporary solution to check for theft from a hopper-fed chiseled bookshelf, the click event still is recorded.

commented

Hoping this will help with debugging...

I did a little more research and this bug seems to apply to all receiving containers under the following conditions:

  • Hopper is pushing items into a container
  • Item taken from container is immediately replaced by the same item.
  • if the item is a non-stackable item, no container interaction is recorded
  • if the item is a stackable item, the container interaction is recorded, but less up-to-4 items that refilled the slot.
  1. For example, if one removes half a stack of an item and the hopper starts refilling, if the hopper has more than 4 items, it will record 28 items taken from the container.
  2. But if the hopper has less than 4 items, let's say 2 items, it will record the difference, in this example, 30 items taken.
  • Finally, if the item being replaced is different, the quantity of items removed is recorded correctly. However, it also shows the user as having added up to 4 of the new item to the container they just removed item from even if there are more than 4 items that fill the container from the hopper.

Hope this helps.

commented

The issues I was able to replicate with chiseled bookshelves should now be fixed in this commit: af1d440

This new simplified logic will improve logging accuracy, and now offers consistency between Spigot and Paper based software. There may be new issues introduced from this, but in general, it should fix more than it breaks.

commented

Hoping this will help with debugging...

I did a little more research and this bug seems to apply to all receiving containers under the following conditions:

  • Hopper is pushing items into a container
  • Item taken from container is immediately replaced by the same item.
  • if the item is a non-stackable item, no container interaction is recorded
  • if the item is a stackable item, the container interaction is recorded, but less up-to-4 items that refilled the slot.
  1. For example, if one removes half a stack of an item and the hopper starts refilling, if the hopper has more than 4 items, it will record 28 items taken from the container.
  2. But if the hopper has less than 4 items, let's say 2 items, it will record the difference, in this example, 30 items taken.
  • Finally, if the item being replaced is different, the quantity of items removed is recorded correctly. However, it also shows the user as having added up to 4 of the new item to the container they just removed item from even if there are more than 4 items that fill the container from the hopper.

Hope this helps.

Unable to replicate any of that on a chest.

image