mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
Null ItemStack cleanup
This commit is contained in:
1 parent
398f0284a8
commit
c12059e1b1
12 files changed
+40
-45
No files matched your search
@@ -7,7 +7,6 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
@@ -155,7 +154,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
{
|
||||
if(entry.getValue().iterStacks != null && entry.getValue().iterStacks.size() == 0)
|
||||
{
|
||||
entry.getValue().renderStack = null;
|
||||
entry.getValue().renderStack = ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +162,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
{
|
||||
if(entry.getValue().iterStacks != null && entry.getValue().iterStacks.size() == 0)
|
||||
{
|
||||
entry.getValue().renderStack = null;
|
||||
entry.getValue().renderStack = ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,7 +464,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
{
|
||||
MItemStackFilter itemFilter = (MItemStackFilter)filter;
|
||||
|
||||
if(itemFilter.itemType != null && !itemFilter.itemType.isEmpty())
|
||||
if(!itemFilter.itemType.isEmpty())
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
@@ -486,7 +485,8 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
}
|
||||
|
||||
ItemStack renderStack = oreDictStacks.get(filter).renderStack;
|
||||
if(renderStack != null && !renderStack.isEmpty())
|
||||
|
||||
if(!renderStack.isEmpty())
|
||||
{
|
||||
try {
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -503,7 +503,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
{
|
||||
MMaterialFilter itemFilter = (MMaterialFilter)filter;
|
||||
|
||||
if(itemFilter.materialItem != null && !itemFilter.materialItem.isEmpty())
|
||||
if(!itemFilter.materialItem.isEmpty())
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
@@ -524,7 +524,8 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
}
|
||||
|
||||
ItemStack renderStack = modIDStacks.get(filter).renderStack;
|
||||
if(renderStack != null && !renderStack.isEmpty())
|
||||
|
||||
if(!renderStack.isEmpty())
|
||||
{
|
||||
try {
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -765,7 +766,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
{
|
||||
public List<ItemStack> iterStacks;
|
||||
public int stackIndex;
|
||||
public @Nullable ItemStack renderStack;
|
||||
public ItemStack renderStack = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user