aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTec <daniel112092@gmail.com>2020-04-19 13:56:54 +0200
committerTec <daniel112092@gmail.com>2020-04-19 13:56:54 +0200
commita3160c99c1151b9bff6c56bad819336ca12a4e6c (patch)
tree52fb777f32a890dc5615bc15a2b00f99404c43ad
parenta5c8713f445c70cc764ad21b021b8242e01c6719 (diff)
downloadGT5-Unofficial-a3160c99c1151b9bff6c56bad819336ca12a4e6c.tar.gz
GT5-Unofficial-a3160c99c1151b9bff6c56bad819336ca12a4e6c.tar.bz2
GT5-Unofficial-a3160c99c1151b9bff6c56bad819336ca12a4e6c.zip
Null check this stuff
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java
index c98db2b985..0663cdfaca 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java
@@ -26,9 +26,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.FluidStack;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
import static com.github.technus.tectech.CommonValues.V;
import static com.github.technus.tectech.Reference.MODID;
@@ -186,8 +184,9 @@ public class GT_MetaTileEntity_DataReader extends GT_MetaTileEntity_BasicMachine
renders.add(render);
}
- public static ArrayList<IDataRender> getRenders(Util.ItemStack_NoNBT stack){
- return RENDER_REGISTRY.get(stack);
+ public static List<IDataRender> getRenders(Util.ItemStack_NoNBT stack){
+ ArrayList<IDataRender> iDataRenders = RENDER_REGISTRY.get(stack);
+ return iDataRenders==null?Collections.emptyList():iDataRenders;
}
public interface IDataRender {