Convert to threadsafe molten metal list (#120)

* Convert to threadsafe molten metal list

* back to foreach

* wrap in sync bloc
This commit is contained in:
Caedis authored and GitHub committed 2024-07-10 14:06:07 -05:00
1 parent 4f9ba9d0b7
commit c2c2f14596
4 files changed
+47 -43

No files matched your search

@@ -19,7 +19,7 @@ public class AlloyMix {
* public boolean matches(List liquids) { ArrayList list = new ArrayList(mixers); return false; }
*/
public FluidStack mix(ArrayList<FluidStack> liquids) {
public FluidStack mix(List<FluidStack> liquids) {
ArrayList<FluidStack> copyMix = new ArrayList<>(mixers);
ArrayList<Integer> effectiveAmount = new ArrayList<>();
@@ -171,7 +171,7 @@ public class Smeltery {
return instance.renderIndex.get(new ItemMetaWrapper(input));
}
public static ArrayList<FluidStack> mixMetals(ArrayList<FluidStack> moltenMetal) {
public static ArrayList<FluidStack> mixMetals(List<FluidStack> moltenMetal) {
ArrayList<FluidStack> liquids = new ArrayList<>();
for (AlloyMix alloy : instance.alloys) {
FluidStack liquid = alloy.mix(moltenMetal);