Fix crash when opening non-advanced hopper GUI

This commit is contained in:
Shadowfacts 2017-07-01 18:58:43 -04:00
parent daddd28d8f
commit b97e44f816
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 7 additions and 5 deletions

View File

@ -20,11 +20,13 @@ class ContainerInventoryHopper(val hopper: TileEntityInventoryHopper, playerInv:
addSlotToContainer(SlotHopper(hopper, i, 44 + i * 18, 21))
}
for (i in 0..2) {
addSlotToContainer(SlotItemFilter(hopper, i, -62 + i * 18, 12))
}
for (i in 0..2) {
addSlotToContainer(SlotItemFilter(hopper, i + 3, -62 + i * 18, 33))
if (hopper.advanced) {
for (i in 0..2) {
addSlotToContainer(SlotItemFilter(hopper, i, -62 + i * 18, 12))
}
for (i in 0..2) {
addSlotToContainer(SlotItemFilter(hopper, i + 3, -62 + i * 18, 33))
}
}
for (l in 0..2) {