[REQURET] Script weather
-
var S03PacketTimeUpdate = Java.type('net.minecraft.network.play.server.S03PacketTimeUpdate'); var script = registerScript({ name: 'Weather', version: '0.0.0', authors: ['Shurpe'] }); script.registerModule({ name: 'Weather', description: '', category: 'Fun', settings: { time: Setting.integer({ name: 'Time', default: 10000, min: 0, max: 20000 }), mode: Setting.list({ name: 'Mode', default: 'Sunset', values: ['Day', 'Night', 'Sunset', 'Custom'] }) } }, function (module) { module.on('update', function () { if (module.settings.mode.get() == 'Custom') { module.tag = '§F' + module.settings.time.get(); } else { module.tag = '§F' + module.settings.mode.get(); } switch (module.settings.mode.get()) { case 'Day': mc.theWorld.setWorldTime(500); break; case 'Night': mc.theWorld.setWorldTime(14000); break; case 'Sunset': mc.theWorld.setWorldTime(12550); break; case 'Custom': mc.theWorld.setWorldTime(module.settings.time.get()); break; } }); module.on('packet', function (e) { if(e.getPacket() instanceof S03PacketTimeUpdate) { e.cancelEvent(); } }); });
-
@tenebrous thank