Merge pull request #70 from B2H990/master
TPS Sync, Auto mode fix, NoToast
This commit is contained in:
commit
9dea8d866d
|
@ -172,6 +172,7 @@ public final class ModuleManager {
|
|||
add(new FakePlayerModule());
|
||||
add(new FriendTabModule());
|
||||
add(new AmbianceModule());
|
||||
add(new NoToast());
|
||||
|
||||
// p2w experience
|
||||
if (Seppuku.INSTANCE.getCapeManager().hasCape())
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package me.rigamortis.seppuku.impl.module.misc;
|
||||
|
||||
import me.rigamortis.seppuku.api.event.player.EventUpdateWalkingPlayer;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
||||
public final class NoToast extends Module {
|
||||
|
||||
public NoToast() {
|
||||
super("NoToast", new String[]{"Toast"}, "Prevents Mojang Harrasment", "NONE", -1, ModuleType.WORLD);
|
||||
}
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@Listener
|
||||
public void onWalkingUpdate(EventUpdateWalkingPlayer event) {
|
||||
mc.getToastGui().clear();
|
||||
}
|
||||
}
|
|
@ -43,7 +43,7 @@ public final class SpeedMineModule extends Module {
|
|||
|
||||
public final Value<Boolean> reset = new Value<Boolean>("Reset", new String[]{"Res"}, "Stops current block destroy damage from resetting if enabled.", true);
|
||||
public final Value<Boolean> doubleBreak = new Value<Boolean>("DoubleBreak", new String[]{"DoubleBreak", "Double", "DB"}, "Mining a block will also mine the block above it, if enabled.", false);
|
||||
public final Value<Boolean> auto = new Value<Boolean>("Auto", new String[]{"Res"}, "When enabled, allows for multi-mining blocks.", false);
|
||||
public final Value<Boolean> auto = new Value<Boolean>("Auto", new String[]{}, "When enabled, allows for multi-mining blocks.", false);
|
||||
|
||||
public SpeedMineModule() {
|
||||
super("SpeedMine", new String[]{"FastMine"}, "Allows you to break blocks faster", "NONE", -1, ModuleType.WORLD);
|
||||
|
@ -134,7 +134,13 @@ public final class SpeedMineModule extends Module {
|
|||
mc.playerController.onPlayerDestroyBlock(event.getPos());
|
||||
mc.world.setBlockToAir(event.getPos());
|
||||
if (auto.getValue()) {
|
||||
autoPos = event.getPos();
|
||||
if (autoPos == null) {
|
||||
autoPos = event.getPos();
|
||||
}
|
||||
else if (mc.world.getBlockState(autoPos).getBlock() == Blocks.AIR) {
|
||||
autoPos = event.getPos();
|
||||
}
|
||||
|
||||
mode.setValue(Mode.DAMAGE);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package me.rigamortis.seppuku.impl.module.world;
|
||||
|
||||
import me.rigamortis.seppuku.Seppuku;
|
||||
import me.rigamortis.seppuku.api.event.EventStageable;
|
||||
import me.rigamortis.seppuku.api.event.player.EventPlayerUpdate;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
|
@ -14,6 +15,7 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
public final class TimerModule extends Module {
|
||||
|
||||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd"}, "Tick-rate multiplier. [(20tps/second) * (this value)]", 4.0f, 0.0f, 10.0f, 0.1f);
|
||||
public final Value<Boolean> tpsSync = new Value<Boolean>("TPSSync", new String[]{"Sync"}, "Syncs timer with the servers TPS", false);
|
||||
|
||||
public TimerModule() {
|
||||
super("Timer", new String[]{"Time", "Tmr"}, "Speeds up the client tick rate", "NONE", -1, ModuleType.WORLD);
|
||||
|
@ -33,6 +35,9 @@ public final class TimerModule extends Module {
|
|||
@Listener
|
||||
public void onUpdate(EventPlayerUpdate event) {
|
||||
if (event.getStage() == EventStageable.EventStage.PRE) {
|
||||
if (tpsSync.getValue()) {
|
||||
speed.setValue(Seppuku.INSTANCE.getTickRateManager().getTickRate()/20);
|
||||
}
|
||||
Minecraft.getMinecraft().timer.tickLength = 50.0f / speed.getValue();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue