crash fix

This commit is contained in:
Cloudburst
2021-05-04 10:47:39 +02:00
parent 33d1f094f6
commit f89c01e706

View File

@@ -131,8 +131,11 @@ public class InteractionScreen extends Screen {
ItemStack[] stack = new ItemStack[27]; ItemStack[] stack = new ItemStack[27];
final int[] index = {0}; final int[] index = {0};
if (e instanceof EndermanEntity) { if (e instanceof EndermanEntity) {
stack[index[0]] = ((EndermanEntity)e).getCarriedBlock().getBlock().asItem().getDefaultStack(); try {
index[0]++; stack[index[0]] = ((EndermanEntity)e).getCarriedBlock().getBlock().asItem().getDefaultStack();
index[0]++;
}
catch (NullPointerException ex) {}
} }
if (Saddleable.class.isInstance(e)) { if (Saddleable.class.isInstance(e)) {
if (((Saddleable)e).isSaddled()){ if (((Saddleable)e).isSaddled()){