mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-20 20:12:12 +00:00
- Added 1.6.4 port
- Fixed /mt name command - Renames MC17 to MC172, in preparation of the 1.7.10 port
This commit is contained in:
1 parent
0c535134c5
commit
db900d3b60
126 files changed
+4880
-57
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package minetweaker.mc172.network;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.mc172.MineTweakerMod;
|
||||
import minetweaker.runtime.providers.ScriptProviderMemory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan
|
||||
*/
|
||||
public class MineTweakerLoadScriptsHandler implements IMessageHandler<MineTweakerLoadScriptsPacket, IMessage> {
|
||||
@Override
|
||||
public IMessage onMessage(MineTweakerLoadScriptsPacket message, MessageContext ctx) {
|
||||
if (!MineTweakerMod.INSTANCE.iAmServer()) {
|
||||
/*IScriptProvider scriptProvider = new ScriptProviderMemory(message.getData());
|
||||
Iterator<IScriptIterator> scripts = scriptProvider.getScripts();
|
||||
while (scripts.hasNext()) {
|
||||
IScriptIterator myGroup = scripts.next();
|
||||
System.out.println("Scripts: " + myGroup.getGroupName());
|
||||
|
||||
while (myGroup.next()) {
|
||||
System.out.println("Script name: " + myGroup.getName());
|
||||
}
|
||||
}*/
|
||||
MineTweakerAPI.tweaker.setScriptProvider(new ScriptProviderMemory(message.getData()));
|
||||
MineTweakerAPI.tweaker.rollback();
|
||||
MineTweakerAPI.tweaker.load();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user