Null Checks

This commit is contained in:
Brianna O'Keefe 2019-01-05 15:24:42 -05:00
parent fe16c755e7
commit e72e4939fa
2 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,8 @@ public class HopHandler {
List<Material> blockedMaterials = new ArrayList<>();
if (hopperState == null || hopperState.getInventory() == null) continue;
for (Module module : hopper.getLevel().getRegisteredModules()) {
// Run Module
module.run(hopper);

View File

@ -61,6 +61,7 @@ public class ModuleSuction implements Module {
hopItem.setAmount(WildStackerAPI.getItemAmount((Item)entity));
ItemStack item = ((Item) entity).getItemStack();
if (item == null) continue;
if (!canMove(hopperBlock.getInventory(), item)) {
continue;
}