mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 07:36:01 +00:00
Java5 cleanup
- Replace for loops with foreach - Remove unnecessary boxing
This commit is contained in:
1 parent
6721909e84
commit
3db03edbc9
6 files changed
+50
-41
No files matched your search
@@ -317,31 +317,30 @@ public final class OreDictManager
|
||||
}
|
||||
|
||||
List<ItemStack> registeredOres = OreDictionary.getOres("logWood");
|
||||
|
||||
for(int i = 0; i < registeredOres.size(); i++)
|
||||
{
|
||||
ItemStack logEntry = registeredOres.get(i);
|
||||
|
||||
if(logEntry.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
||||
for (ItemStack logEntry : registeredOres)
|
||||
{
|
||||
if (logEntry.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
||||
{
|
||||
for(int j = 0; j < 16; j++)
|
||||
for (int j = 0; j < 16; j++)
|
||||
{
|
||||
ItemStack log = new ItemStack(logEntry.getItem(), 1, j);
|
||||
tempCrafting.setInventorySlotContents(0, log);
|
||||
ItemStack resultEntry = MekanismUtils.findMatchingRecipe(tempCrafting, null);
|
||||
|
||||
if(!resultEntry.isEmpty())
|
||||
if (!resultEntry.isEmpty())
|
||||
{
|
||||
RecipeHandler.addPrecisionSawmillRecipe(log, StackUtils.size(resultEntry, 6), new ItemStack(MekanismItems.Sawdust), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
ItemStack log = StackUtils.size(logEntry, 1);
|
||||
tempCrafting.setInventorySlotContents(0, log);
|
||||
ItemStack resultEntry = MekanismUtils.findMatchingRecipe(tempCrafting, null);
|
||||
|
||||
if(!resultEntry.isEmpty())
|
||||
if (!resultEntry.isEmpty())
|
||||
{
|
||||
RecipeHandler.addPrecisionSawmillRecipe(log, StackUtils.size(resultEntry, 6), new ItemStack(MekanismItems.Sawdust), 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user