From f0418333ed443ceddf78c7658737dac697462b59 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Wed, 29 Jun 2016 19:24:32 +1000 Subject: Think I've fixed bad textured registration. All fluids should now have valid textures or textures missing within the domain. --- src/Java/miscutil/core/util/item/UtilsItems.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/Java/miscutil/core/util/item') diff --git a/src/Java/miscutil/core/util/item/UtilsItems.java b/src/Java/miscutil/core/util/item/UtilsItems.java index 590b0167be..82075a7093 100644 --- a/src/Java/miscutil/core/util/item/UtilsItems.java +++ b/src/Java/miscutil/core/util/item/UtilsItems.java @@ -112,6 +112,28 @@ public class UtilsItems { return null; } } + + @SuppressWarnings("unused") + public static ItemStack simpleMetaStack(Item item, int meta, int itemstackSize){ + try { + Item em = item; + Item em1 = item; + Utils.LOG_WARNING("Found: "+em1.getUnlocalizedName()+":"+meta); + if (em1 != null){ + if (null == em){ + em = em1; + } + if (em != null){ + ItemStack metaStack = new ItemStack(em,itemstackSize,meta); + return metaStack; + } + } + return null; + } catch (NullPointerException e) { + Utils.LOG_ERROR(item.getUnlocalizedName()+" not found. [NULL]"); + return null; + } + } public static ItemStack getCorrectStacktype(String fqrn, int stackSize){ String oreDict = "ore:"; -- cgit