move slot machine functionality to the blockentity

This commit is contained in:
2026-03-04 08:47:25 +01:00
parent 69428bdca3
commit fef55c6d68
4 changed files with 154 additions and 110 deletions

View File

@@ -157,7 +157,10 @@ public class SlotMachineScreen extends HandledScreen<SlotMachineScreenHandler> {
int guiLeft = (width - backgroundWidth) / 2;
int guiTop = (height - backgroundHeight) / 2;
if (handler.blockEntity.isHandleClicked(inventory.player)) {
handleClicked = true;
handleAnimTicks = 0;
}
// Handle animation
if (handleClicked) {
handleAnimTicks++;