mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-26 23:12:58 +00:00
Use Collections.addAll
This commit is contained in:
1 parent
57930991ec
commit
c6783e573c
12 files changed
+30
-57
No files matched your search
@@ -11,6 +11,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class WoodManager {
|
||||
@@ -92,20 +93,14 @@ public class WoodManager {
|
||||
|
||||
public static List<IPlankType> getAllPlankTypes() {
|
||||
final List<IPlankType> list = new ArrayList<>();
|
||||
for (final IPlankType type : PlankType.ExtraTreePlanks.values()) {
|
||||
list.add(type);
|
||||
}
|
||||
for (final IPlankType type : PlankType.ForestryPlanks.values()) {
|
||||
list.add(type);
|
||||
}
|
||||
Collections.addAll(list, PlankType.ExtraTreePlanks.values());
|
||||
Collections.addAll(list, PlankType.ForestryPlanks.values());
|
||||
for (final IPlankType type : PlankType.ExtraBiomesPlank.values()) {
|
||||
if (type.getStack() != null) {
|
||||
list.add(type);
|
||||
}
|
||||
}
|
||||
for (final IPlankType type : PlankType.VanillaPlanks.values()) {
|
||||
list.add(type);
|
||||
}
|
||||
Collections.addAll(list, PlankType.VanillaPlanks.values());
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import forestry.api.arboriculture.IWoodType;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
@@ -42,13 +43,9 @@ public class ModuleCore implements IInitializable {
|
||||
speciesQueue.add(s);
|
||||
}
|
||||
final Queue<IWoodType> logQueue = new LinkedList<>();
|
||||
for (final IWoodType wood : EnumExtraTreeLog.values()) {
|
||||
logQueue.add(wood);
|
||||
}
|
||||
Collections.addAll(logQueue, EnumExtraTreeLog.values());
|
||||
final Queue<IDesignMaterial> plankQueue = new LinkedList<>();
|
||||
for (final IDesignMaterial wood2 : PlankType.ExtraTreePlanks.values()) {
|
||||
plankQueue.add(wood2);
|
||||
}
|
||||
Collections.addAll(plankQueue, PlankType.ExtraTreePlanks.values());
|
||||
final Queue<ExtraTreeFruitGene> fruitQueue = new LinkedList<>();
|
||||
for (final ExtraTreeFruitGene wood3 : ExtraTreeFruitGene.values()) {
|
||||
fruitQueue.add(wood3);
|
||||
|
||||
Reference in new issue
Block a user