mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Java 7 and 8 cleanup
Diamond operator <> Lambdas and method references
This commit is contained in:
1 parent
3db03edbc9
commit
b72d6efab3
234 files changed
+1614
-2253
No files matched your search
@@ -12,15 +12,15 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public final class OreDictCache
|
||||
{
|
||||
public static HashMap<ItemInfo, List<String>> cachedKeys = new HashMap<ItemInfo, List<String>>();
|
||||
public static HashMap<String, List<ItemStack>> oreDictStacks = new HashMap<String, List<ItemStack>>();
|
||||
public static HashMap<String, List<ItemStack>> modIDStacks = new HashMap<String, List<ItemStack>>();
|
||||
public static HashMap<ItemInfo, List<String>> cachedKeys = new HashMap<>();
|
||||
public static HashMap<String, List<ItemStack>> oreDictStacks = new HashMap<>();
|
||||
public static HashMap<String, List<ItemStack>> modIDStacks = new HashMap<>();
|
||||
|
||||
public static List<String> getOreDictName(ItemStack check)
|
||||
{
|
||||
if(check.isEmpty())
|
||||
{
|
||||
return new ArrayList<String>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
ItemInfo info = ItemInfo.get(check);
|
||||
@@ -33,7 +33,7 @@ public final class OreDictCache
|
||||
|
||||
int[] idsFound = OreDictionary.getOreIDs(check);
|
||||
|
||||
List<String> ret = new ArrayList<String>();
|
||||
List<String> ret = new ArrayList<>();
|
||||
|
||||
for(Integer id : idsFound)
|
||||
{
|
||||
@@ -52,7 +52,7 @@ public final class OreDictCache
|
||||
return oreDictStacks.get(oreName);
|
||||
}
|
||||
|
||||
List<String> keys = new ArrayList<String>();
|
||||
List<String> keys = new ArrayList<>();
|
||||
|
||||
for(String s : OreDictionary.getOreNames())
|
||||
{
|
||||
@@ -88,7 +88,7 @@ public final class OreDictCache
|
||||
}
|
||||
}
|
||||
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
|
||||
for(String key : keys)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ public final class OreDictCache
|
||||
return modIDStacks.get(modName);
|
||||
}
|
||||
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
|
||||
for(String key : OreDictionary.getOreNames())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user