Fixed global operations and now sorting them.
This commit is contained in:
@ -10,6 +10,7 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mod.EventBusSubscriber(modid = XpTools.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
@Mod.EventBusSubscriber(modid = XpTools.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||||
@ -93,8 +94,9 @@ public final class Config {
|
|||||||
// Parse all block break global operations
|
// Parse all block break global operations
|
||||||
blockBreakGlobalOperationItems = new ArrayList<>();
|
blockBreakGlobalOperationItems = new ArrayList<>();
|
||||||
for (String s : blockBreakGlobalOperationsRaw.get()) {
|
for (String s : blockBreakGlobalOperationsRaw.get()) {
|
||||||
blockBreakOperationItems.add(GlobalOperationItem.fromConfig(s));
|
blockBreakGlobalOperationItems.add(GlobalOperationItem.fromConfig(s));
|
||||||
}
|
}
|
||||||
|
blockBreakGlobalOperationItems.sort(Comparator.comparingInt(OperationItem::getPriority));
|
||||||
|
|
||||||
// Parse all block break unique operations
|
// Parse all block break unique operations
|
||||||
blockBreakOperationItems = new ArrayList<>();
|
blockBreakOperationItems = new ArrayList<>();
|
||||||
|
Reference in New Issue
Block a user