add nopush

This commit is contained in:
S-B99 2020-02-28 21:56:55 -05:00 committed by Bella
parent 4de9c14996
commit deb15b183d
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import net.minecraft.network.play.server.SPacketExplosion;
@Module.Info(name = "Velocity", description = "Modify knockback impact", category = Module.Category.MOVEMENT)
public class Velocity extends Module {
private Setting<Boolean> noPush = register(Settings.b("NoPush", true));
private Setting<Float> horizontal = register(Settings.f("Horizontal", 0));
private Setting<Float> vertical = register(Settings.f("Vertical", 0));
@ -44,7 +45,7 @@ public class Velocity extends Module {
@EventHandler
private Listener<EntityEvent.EntityCollision> entityCollisionListener = new Listener<>(event -> {
if (event.getEntity() == mc.player) {
if (horizontal.getValue() == 0 && vertical.getValue() == 0) {
if ((horizontal.getValue() == 0 && vertical.getValue() == 0) || noPush.getValue()) {
event.cancel();
return;
}