Fix slot OOB indexing
This commit is contained in:
@@ -961,13 +961,13 @@ public abstract class AEBaseContainer extends Container {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, @NotNull EntityPlayer player) {
|
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, @NotNull EntityPlayer player) {
|
||||||
final var slot = this.getSlot(slotId);
|
if (slotId >= 0) {
|
||||||
if (slot instanceof SlotDisabled) {
|
final var slot = this.getSlot(slotId);
|
||||||
return ItemStack.EMPTY;
|
if (slot instanceof SlotDisabled) {
|
||||||
}
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
if (slotId >= 0 && clickTypeIn == ClickType.PICKUP) {
|
if (slot instanceof AppEngSlot appEngSlot && clickTypeIn == ClickType.PICKUP) {
|
||||||
if (slot instanceof AppEngSlot appEngSlot) {
|
|
||||||
var slotStack = slot.getStack();
|
var slotStack = slot.getStack();
|
||||||
var draggedStack = this.invPlayer.getItemStack();
|
var draggedStack = this.invPlayer.getItemStack();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user