Fix small issue with TOP support.

This commit is contained in:
modmuss50 2017-10-13 11:07:18 +01:00
parent 709922b708
commit a26d11ee51

View file

@ -105,13 +105,14 @@ public class ProbeProvider implements IProbeInfoProvider {
probeInfo.text("Inventory");
}
Inventory inventory = legacyMachineBase.getInventoryForTile().get();
List<ItemStack> stacks = Arrays.stream(inventory.contents).filter(stack -> !stack.isEmpty()).collect(Collectors.toList());
try {
methodHandle_addStacks.invoke(probeInfo, world, null, stacks, player.isSneaking());
} catch (Throwable throwable) {
throwable.printStackTrace();
if(!inventory.isEmpty()){
List<ItemStack> stacks = Arrays.stream(inventory.contents).filter(stack -> !stack.isEmpty()).collect(Collectors.toList());
try {
methodHandle_addStacks.invoke(probeInfo, world, null, stacks, player.isSneaking());
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
}
if (!legacyMachineBase.upgradeInventory.isEmpty() && player.isSneaking()) {
probeInfo.horizontal();