mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 21:09:51 +00:00
Big code cleanup
This commit is contained in:
1 parent
1b58077904
commit
a3363fb4bc
132 files changed
+1587
-1863
No files matched your search
@@ -86,7 +86,7 @@ public final class MemorizedRecipe implements INbtWritable, INbtReadable, IStrea
|
||||
}
|
||||
|
||||
public ItemStack getRecipeOutput() {
|
||||
if (recipeOutputs.size() == 0) {
|
||||
if (recipeOutputs.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
return recipeOutputs.get(selectedRecipe);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class CentrifugeRecipeCategory extends ForestryRecipeCategory {
|
||||
|
||||
private void setResults(Map<ItemStack, Float> outputs, GuiItemStackGroup guiItemStacks) {
|
||||
Set<Entry<ItemStack, Float>> entrySet = outputs.entrySet();
|
||||
if (entrySet.size() == 0) {
|
||||
if (entrySet.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
PriorityQueue<Entry<ItemStack, Float>> sortByChance = new PriorityQueue<>(entrySet.size(), highestChanceComparator);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class FabricatorRecipeCategory extends ForestryRecipeCategory {
|
||||
for (IFabricatorSmeltingRecipe smelting : FabricatorSmeltingRecipeManager.recipes) {
|
||||
Fluid fluid = smelting.getProduct().getFluid();
|
||||
if (!smeltingInputs.containsKey(fluid)) {
|
||||
smeltingInputs.put(fluid, new ArrayList<IFabricatorSmeltingRecipe>());
|
||||
smeltingInputs.put(fluid, new ArrayList<>());
|
||||
}
|
||||
smeltingInputs.get(fluid).add(smelting);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ public class TileMoistener extends TileBase implements ISidedInventory, ILiquidT
|
||||
}
|
||||
|
||||
// Grab new items from stash
|
||||
for (int i = 0; i < (slotsToShift.size() > 0 ? shiftedSlots : 2); i++) {
|
||||
for (int i = 0; i < (!slotsToShift.isEmpty() ? shiftedSlots : 2); i++) {
|
||||
int resourceSlot = getNextResourceSlot(0, InventoryMoistener.SLOT_RESERVOIR_1);
|
||||
// Stop if no resources are available
|
||||
if (resourceSlot < 0) {
|
||||
|
||||
Reference in new issue
Block a user