mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-28 07:35:40 +00:00
- Did some API refactoring
- Added liquid container addition and removal (removal only possible in 1.6.4) - Extended NEI support to 1.7.10 - Extended IC2 support to 1.6.4
This commit is contained in:
1 parent
115593efa5
commit
70cba6d84b
143 files changed
+3118
-632
No files matched your search
@@ -16,6 +16,6 @@ public class GlobalFunctions {
|
||||
private GlobalFunctions() {}
|
||||
|
||||
public static void print(String message) {
|
||||
MineTweakerAPI.getLogger().logInfo(message);
|
||||
MineTweakerAPI.logInfo(message);
|
||||
}
|
||||
}
|
||||
@@ -143,18 +143,18 @@ public class GlobalRegistry {
|
||||
@Override
|
||||
public void error(ZenPosition position, String message) {
|
||||
if (position == null) {
|
||||
MineTweakerAPI.getLogger().logError("system: " + message);
|
||||
MineTweakerAPI.logError("system: " + message);
|
||||
} else {
|
||||
MineTweakerAPI.getLogger().logError(position + ": " + message);
|
||||
MineTweakerAPI.logError(position + ": " + message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warning(ZenPosition position, String message) {
|
||||
if (position == null) {
|
||||
MineTweakerAPI.getLogger().logWarning("system: " + message);
|
||||
MineTweakerAPI.logWarning("system: " + message);
|
||||
} else {
|
||||
MineTweakerAPI.getLogger().logWarning(position + ": " + message);
|
||||
MineTweakerAPI.logWarning(position + ": " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,12 +259,12 @@ public class GlobalRegistry {
|
||||
|
||||
@Override
|
||||
public void error(ZenPosition position, String message) {
|
||||
MineTweakerAPI.getLogger().logError(position.toString() + " > " + message);
|
||||
MineTweakerAPI.logError(position.toString() + " > " + message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warning(ZenPosition position, String message) {
|
||||
MineTweakerAPI.getLogger().logWarning(position.toString() + " > " + message);
|
||||
MineTweakerAPI.logWarning(position.toString() + " > " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class MTTweaker implements ITweaker {
|
||||
|
||||
@Override
|
||||
public void apply(IUndoableAction action) {
|
||||
MineTweakerAPI.getLogger().logInfo(action.describe());
|
||||
MineTweakerAPI.logInfo(action.describe());
|
||||
|
||||
Object overrideKey = action.getOverrideKey();
|
||||
if (wereStuck.contains(action)) {
|
||||
@@ -76,10 +76,10 @@ public class MTTweaker implements ITweaker {
|
||||
for (int i = actions.size() - 1; i >= 0; i--) {
|
||||
IUndoableAction action = actions.get(i);
|
||||
if (action.canUndo()) {
|
||||
MineTweakerAPI.getLogger().logInfo(action.describeUndo());
|
||||
MineTweakerAPI.logInfo(action.describeUndo());
|
||||
action.undo();
|
||||
} else {
|
||||
MineTweakerAPI.getLogger().logInfo("[Stuck] " + action.describe());
|
||||
MineTweakerAPI.logInfo("[Stuck] " + action.describe());
|
||||
stuck.add(0, action);
|
||||
wereStuck.add(action);
|
||||
|
||||
@@ -129,12 +129,12 @@ public class MTTweaker implements ITweaker {
|
||||
ZenParsedFile pfile = new ZenParsedFile(filename, className, parser, environmentGlobal);
|
||||
files.add(pfile);
|
||||
} catch (IOException ex) {
|
||||
MineTweakerAPI.getLogger().logError("Could not load script " + script.getName() + ": " + ex.getMessage());
|
||||
MineTweakerAPI.logError("Could not load script " + script.getName() + ": " + ex.getMessage());
|
||||
} catch (ParseException ex) {
|
||||
//ex.printStackTrace();
|
||||
MineTweakerAPI.getLogger().logError("Error parsing " + ex.getFile().getFileName() + ":" + ex.getLine() + " -- " + ex.getExplanation());
|
||||
MineTweakerAPI.logError("Error parsing " + ex.getFile().getFileName() + ":" + ex.getLine() + " -- " + ex.getExplanation());
|
||||
} catch (Exception ex) {
|
||||
MineTweakerAPI.getLogger().logError("Error loading " + script.getName() + ": " + ex.toString());
|
||||
MineTweakerAPI.logError("Error loading " + script.getName() + ": " + ex.toString());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -154,16 +154,16 @@ public class MTTweaker implements ITweaker {
|
||||
ZenModule module = new ZenModule(classes, MineTweakerAPI.class.getClassLoader());
|
||||
module.getMain().run();
|
||||
} catch (Exception ex) {
|
||||
MineTweakerAPI.getLogger().logError("Error executing " + script.getGroupName() + ": " + ex.getMessage());
|
||||
MineTweakerAPI.logError("Error executing " + script.getGroupName() + ": " + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wereStuck.size() > 0) {
|
||||
MineTweakerAPI.getLogger().logWarning(Integer.toString(wereStuck.size()) + " modifications were stuck");
|
||||
MineTweakerAPI.logWarning(Integer.toString(wereStuck.size()) + " modifications were stuck");
|
||||
for (IUndoableAction action : wereStuck) {
|
||||
MineTweakerAPI.getLogger().logInfo("Stuck: " + action.describe());
|
||||
MineTweakerAPI.logInfo("Stuck: " + action.describe());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class ScriptProviderDirectory implements IScriptProvider {
|
||||
try {
|
||||
scripts.add(new ScriptIteratorZip(file));
|
||||
} catch (IOException ex) {
|
||||
MineTweakerAPI.getLogger().logError("Could not load " + file.getName() + ": " + ex.getMessage());
|
||||
MineTweakerAPI.logError("Could not load " + file.getName() + ": " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -63,7 +63,7 @@ public class ScriptProviderMemory implements IScriptProvider {
|
||||
|
||||
deflater.close();
|
||||
} catch (IOException ex) {
|
||||
MineTweakerAPI.getLogger().logError("Could not collect scripts: " + ex.getMessage());
|
||||
MineTweakerAPI.logError("Could not collect scripts: " + ex.getMessage());
|
||||
}
|
||||
return output.toByteArray();
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class ScriptProviderMemory implements IScriptProvider {
|
||||
|
||||
inflaterData.close();
|
||||
} catch (IOException ex) {
|
||||
MineTweakerAPI.getLogger().logError("Could not load transmitted scripts: " + ex.getMessage());
|
||||
MineTweakerAPI.logError("Could not load transmitted scripts: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user