mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-02-09 08:51:51 +01:00
.
This commit is contained in:
parent
cc874d2796
commit
6ce0e98a58
@ -80,12 +80,16 @@ public class JeffChestSortOrganizer {
|
||||
|
||||
// Returns an array with all typematches listed in the category file
|
||||
TypeMatchPositionPair[] loadCategoryFile(File file) throws FileNotFoundException {
|
||||
// This is called "sticky" in the category files. When it is enabled, it has the same effect as when you set {keepCategoryOrder} in your sorting-method, but you can set it per category
|
||||
boolean appendLineNumber = false;
|
||||
Scanner sc = new Scanner(file);
|
||||
List<TypeMatchPositionPair> lines = new ArrayList<TypeMatchPositionPair>();
|
||||
short currentLine=1;
|
||||
short currentLineNumber=1;
|
||||
while (sc.hasNextLine()) {
|
||||
lines.add(new TypeMatchPositionPair(sc.nextLine(),currentLine));
|
||||
currentLine++;
|
||||
String currentLine = sc.nextLine();
|
||||
|
||||
lines.add(new TypeMatchPositionPair(currentLine,currentLineNumber));
|
||||
currentLineNumber++;
|
||||
}
|
||||
TypeMatchPositionPair[] result = lines.toArray(new TypeMatchPositionPair[0]);
|
||||
sc.close();
|
||||
|
18
src/main/resources/categories/900-weapons.txt
Normal file
18
src/main/resources/categories/900-weapons.txt
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# ChestSort Default Category File
|
||||
#
|
||||
# If you want to change this file, rename it.
|
||||
# Please do NOT use file prefixed between 900 and 999 for
|
||||
# your custom files because ChestSort will overwrite them
|
||||
#
|
||||
|
||||
# When sticky is set to true, order the items in this
|
||||
# category exactly as defined in this file.
|
||||
# When set to false, the items are only grouped together
|
||||
# and then sorted according to the other variables
|
||||
# in your sorting-method
|
||||
sticky=true
|
||||
|
||||
bow
|
||||
*_sword
|
||||
trident
|
Loading…
Reference in New Issue
Block a user