Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pdebetta opened this issue Jan 16, 2024 · 4 comments
Closed

Comments

@pdebetta
Copy link

pdebetta commented Jan 16, 2024

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.
@pdebetta
Copy link
Author

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

@pdebetta
Copy link
Author

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.

@Intelli
Copy link
Contributor

Intelli commented Jan 24, 2024

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

@Intelli
Copy link
Contributor

Intelli commented Jan 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants