packagede.paxii.clarinet.module.external;importde.paxii.clarinet.Wrapper;importde.paxii.clarinet.event.EventHandler;importde.paxii.clarinet.event.events.game.IngameTickEvent;importde.paxii.clarinet.module.Module;importde.paxii.clarinet.module.ModuleCategory;importde.paxii.clarinet.util.module.settings.ValueBase;importnet.minecraft.util.Timer;importlombok.Getter;/** * Created by Lars on 28.07.17. */publicclassModuleTimerextendsModule{privateTimertimer;publicModuleTimer(){super("Timer",ModuleCategory.MOVEMENT);this.setVersion("1.0");this.setBuildVersion(18200);this.setDescription("Changes the speed of everything.");this.getModuleValues().put("speed",newValueBase("Speed",2.0F,0.5F,10.0F){@OverridepublicvoidonUpdate(floatoldValue,floatnewValue){ModuleTimer.this.resetTimer();ModuleTimer.this.setTimer();}});}@OverridepublicvoidonEnable(){this.setTimer();}protectedvoidsetTimer(){this.timer=Wrapper.getMinecraft().getTimer();Wrapper.getMinecraft().setTimer(newTimer(this.getValueBase("speed").getValue()*20.0F));}protectedvoidresetTimer(){Wrapper.getMinecraft().setTimer(this.timer);}@OverridepublicvoidonDisable(){this.resetTimer();}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.