Added regions to BaseGUI

This commit is contained in:
NichtStudioCode 2021-08-29 17:56:08 +02:00
parent 9972805d04
commit e92abcf079

@ -79,6 +79,7 @@ public abstract class BaseGUI implements GUI, Controllable {
} else event.setCancelled(true); // Only VISlotElements have allowed interactions } else event.setCancelled(true); // Only VISlotElements have allowed interactions
} }
// region virtual inventories
private void handleVISlotElementClick(VISlotElement element, InventoryClickEvent event) { private void handleVISlotElementClick(VISlotElement element, InventoryClickEvent event) {
// these actions are ignored as they don't modify the inventory // these actions are ignored as they don't modify the inventory
InventoryAction action = event.getAction(); InventoryAction action = event.getAction();
@ -353,6 +354,7 @@ public abstract class BaseGUI implements GUI, Controllable {
return virtualInventories; return virtualInventories;
} }
// endregion
@Override @Override
public void handleSlotElementUpdate(GUI child, int slotIndex) { public void handleSlotElementUpdate(GUI child, int slotIndex) {
@ -571,8 +573,7 @@ public abstract class BaseGUI implements GUI, Controllable {
return size; return size;
} }
// -- coordinate-based methods -- // region coordinate-based methods
@Override @Override
public void setSlotElement(int x, int y, SlotElement slotElement) { public void setSlotElement(int x, int y, SlotElement slotElement) {
setSlotElement(convToIndex(x, y), slotElement); setSlotElement(convToIndex(x, y), slotElement);
@ -687,5 +688,6 @@ public abstract class BaseGUI implements GUI, Controllable {
slotIndex++; slotIndex++;
} }
} }
// endregion
} }