NoLag: Adds force wither no lag option

This commit is contained in:
noil 2021-03-15 19:47:58 -04:00
parent e32c74f67d
commit 7381c5483c
1 changed files with 19 additions and 0 deletions

View File

@ -47,6 +47,7 @@ public final class NoLagModule extends Module {
public final Value<Boolean> sky = new Value<Boolean>("Sky", new String[]{"Skies", "ski"}, "Disables the rendering of the sky.", true);
public final Value<Boolean> names = new Value<Boolean>("Names", new String[]{"Name", "n"}, "Disables the rendering of vanilla name-tags.", false);
public final Value<Boolean> withers = new Value<Boolean>("Withers", new String[]{"Wither", "w"}, "Disables the rendering of withers.", false);
public final Value<Boolean> withersForce = new Value<Boolean>("Withers", new String[]{"WithersForce", "wf"}, "Force disables the rendering of withers.", false);
public final Value<Boolean> skulls = new Value<Boolean>("Skulls", new String[]{"WitherSkull", "skulls", "skull", "ws"}, "Disables the rendering of flying wither skulls.", false);
public final Value<Boolean> crystals = new Value<Boolean>("Crystals", new String[]{"Crystal", "cr", "c"}, "Disables the rendering of crystals.", false);
public final Value<Boolean> tnt = new Value<Boolean>("TNT", new String[]{"Dynamite", "explosives", "tn"}, "Disables the rendering of (primed) TNT.", false);
@ -252,5 +253,23 @@ public final class NoLagModule extends Module {
event.setCanceled(true);
}
}
if (this.withersForce.getValue()) {
if (event.getEntity() instanceof EntityWither) {
event.setCanceled(true);
}
}
if (this.skulls.getValue()) {
if (event.getEntity() instanceof EntityWitherSkull) {
event.setCanceled(true);
}
}
if (this.tnt.getValue()) {
if (event.getEntity() instanceof EntityTNTPrimed) {
event.setCanceled(true);
}
}
}
}