-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redstone recipe #357
Comments
The recipe for redstone and other was removed to a directory disabled.
|
thats the old scripts |
Now I understand the problem. They would order all recipes and expact ModTweaker load all scrips at alphabetical order. But the mod did not do this, I think. A long time ago I intended a change on the old MineTweaker (simple Arrays.sort(files); ). ModTweaker got the same problem.
The recipe exists (last line), but the AAA_vars_and_oreDicts was not loaded befor Vanilla. |
A we are using crafttweeker |
Oh wunderfull, CraftTweaker is a fork of MineTweaker3. For MineTweaker3 I was asking for the directory sorting: stanhebben/MineTweaker3#270 . Wenn I inspect on CraftTweaker the file minetweaker/runtime/providers/ScriptProviderDirectory.java i found the same missing handling for sorting the directory. public Iterator<IScriptIterator> getScripts() {
List<IScriptIterator> scripts = new ArrayList<IScriptIterator>();
if (directory.exists()) {
// <--- missing Array sorting
for (File file : directory.listFiles()) {
if (file.isDirectory()) {
scripts.add(new ScriptIteratorDirectory(file));
} else if (file.getName().endsWith(".zs")) {
scripts.add(new ScriptIteratorSingle(file));
} else if (file.getName().endsWith(".zip")) {
try {
scripts.add(new ScriptIteratorZip(file));
} catch (IOException ex) {
MineTweakerAPI.logError("Could not load " + file.getName() + ": " + ex.getMessage());
}
}
}
}
return scripts.iterator();
} |
were not actuly using normal craft tweaker were using a fork of craft tweaker |
Okay, before barking about how the directories aren't working porperly (which they obviously are!) Like John just commented, we're using a custom Version of CT (Hence the name 'custom' that was added a few days ago), that supports folders and global variables while keeping all of the other MT features! And about the 'disabled' folder: Those files are technically not there! In case you want to take a closer look at our version, on my repo is one that is almost the same as the one we're using (our Version just has "customized" in the mcmod.info files): |
I want only help! My recommendation for the minetweaker/runtime/providers/ScriptIteratorDirectory.java private static void iterate(File directory, List<File> contentsList) {
File[] files = directory.listFiles();
if (files == null) return;
java.util.Arrays.sort(files); // <-- sorting based on Comparable natural ordering
for (File file : files) {
if (file.isDirectory() && !file.getName().equals("disabled")) {
iterate(file, contentsList);
} else if (file.isFile() && file.getName().endsWith(".zs")) {
contentsList.add(file);
}
}
} |
Ok, first of all: |
However, since we do have some Problems with linux Servers atm I'm setting up a VM with ubuntu to test some stuff, then I'll tell ya the loading order. |
We discuss about the redstone. Thanks for the workaround. A last word on the order of files on directory.listFiles(). section listFiles
|
@krakel Gonna add that to mym soon, thx 👍 |
@kindlich |
Made a new issue for the Synching problem: |
should be fixed i belive |
With the new update players are no longer able to make red stone in multiplayer however they can in SP
The text was updated successfully, but these errors were encountered: