Intellij suggested changes

This commit is contained in:
Jason Mitchell committed 2019-12-30 21:21:54 -08:00
1 parent e3462ac9c9
commit 05b5fa7baf
80 files changed
+479 -487

No files matched your search

@@ -12,14 +12,16 @@ import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import java.text.DecimalFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import static codechicken.lib.gui.GuiDraw.drawString;
import static codechicken.lib.gui.GuiDraw.getStringWidth;
public class ProfilerRecipeHandler implements ICraftingHandler, IUsageHandler
{
private static TaskProfiler profiler = new TaskProfiler();
private static final TaskProfiler profiler = new TaskProfiler();
public static TaskProfiler getProfiler()
{
@@ -27,7 +29,7 @@ public class ProfilerRecipeHandler implements ICraftingHandler, IUsageHandler
return profiler;
}
private boolean crafting;
private final boolean crafting;
public ProfilerRecipeHandler(boolean crafting)
{
@@ -64,14 +66,7 @@ public class ProfilerRecipeHandler implements ICraftingHandler, IUsageHandler
if(it.next().name.equals(getRecipeName()))
it.remove();
Collections.sort(results, new Comparator<ProfilerResult>()
{
@Override
public int compare(ProfilerResult o1, ProfilerResult o2)
{
return o1.time < o2.time ? 1 : -1;
}
});
results.sort((o1, o2) -> o1.time < o2.time ? 1 : -1);
for(int i = recipe*6; i < results.size() && i < (recipe+1)*6; i++)
{
@@ -93,13 +88,13 @@ public class ProfilerRecipeHandler implements ICraftingHandler, IUsageHandler
@Override
public ArrayList<PositionedStack> getIngredientStacks(int recipe)
{
return new ArrayList<PositionedStack>();
return new ArrayList<>();
}
@Override
public ArrayList<PositionedStack> getOtherStacks(int recipetype)
{
return new ArrayList<PositionedStack>();
return new ArrayList<>();
}
@Override