Data Organizer is a plugin that adds two new variables, List and Map (key and value).
Examples:
List example:
Map example:
Advanced stuff:
Sublist:
-
The first index should not be negative
-
The second index should not be greater than list size
-
The first index should not be greater than the second index
-
If the first and second indexes are equal, it returns an empty list
list = [a, b, c, d, e, f, g]
anotherList = [b, c, d, e]
-
You can use sublist in blocks that require a list(clear, shuffle, reverse, sort, etc) so that block only affects that part of that list
For example the clear block in this picture will only remove c, d, e and after that the list will look like this: [a, b, f, g]
List Filter:
-
The List Filter block sends each element of the list to the procedure, and if the procedure returns True, that element remains in the list, but if it returns False, that element will be removed from the list
-
The List Filter block does not affect the original list
-
Make sure that the procedure you use for filtering has only one dependency Object, and that object will be the elements of the list
-
If your list is not of only one type (for example, only numbers), you can use these blocks to filter each type separately
List Mapping:
-
The List Mapping block sends each element of the list to the procedure, and the action performed in the procedure is performed on each of the elements and creates a new list of new values.
-
The List Mapping block does not affect the original list
-
Make sure that the procedure you use for mapping has only one dependency Object, and that object will be the elements of the list
-
The mapping procedure return value must be an Object
More complex List Mapping:
-
A new procedure template called list full check has been added, which is long if-elseif and if you want to check each type of data separately, you can use it.
Supported Versions:
-
Forge 1.19.2
-
Forge 1.19.4
-
Forge 1.20.1
-
NeoForge 1.20.4
-
NeoForge 1.20.6
Changelog
2.1.0:
- Port to MCreator 2024.2
- Added Forge-1.19.2, Forge-1.19.4 support
- Added subcategory Compatibilities
- Added File Manager plugin compatibility
- Added normal for loop
- Fixed Sublist block
- Fixed Get list size block
2.0.0:
- Added blocks to check the Object variable type
- Added advanced blocks such as List Filter, List Mapping, Sublist
- Fixed some bugs
- Fixed some spelling mistakes
1.0.0:
- Initial release
Comments
Is there something for organising them in descending to ascending order? Also can you attach strings in lists?. Bec if not then array list plugin would still be better. Keeping in mind that array list plugin allows adding of all variable types like entities direction. Etc
plz add sorting procedure i need it very much. its as simple as using bubble sort or quicksort. here is one i made for array list plugin(bubble sort) for every data type.
for (int i = (int) 0; i < (int) (assort.size() - 1); i++) {
for (int j = (int) 0; j < (int) ((assort.size() - i) - 1); j++) {
if ((assort.get((int) j) instanceof Double _d ? _d : 0) < (assort.get((int) (j + 1)) instanceof Double _d ? _d : 0)) {
temp = assort.get((int) j) instanceof Double _d ? _d : 0;
assort.set((int) j, (assort.get((int) (j + 1)) instanceof Double _d ? _d : 0));
assort.set((int) (j + 1), temp);
}
}
}
Was thinking for 2024.1