improvements to NoParticles
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m29s

This commit is contained in:
Daniella / Tove 2024-06-25 20:18:17 +02:00
parent e5376425ea
commit 75b0b24176
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -3,19 +3,32 @@ package de.com.baseband.client.feature.modules.experimental;
import de.com.baseband.client.event.events.PacketEvent;
import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.Experimental;
import de.com.baseband.client.registry.annotation.Config;
import net.minecraft.network.play.server.SPacketParticles;
@Experimental
public class NoParticles extends Feature {
@Config("Server")
public boolean server = true;
@Config("Client")
public boolean client = false;
public void onPacket(PacketEvent.Receive event) {
if(event.getPacket() instanceof SPacketParticles) {
if(server && event.getPacket() instanceof SPacketParticles) {
event.setCancelled(true);
}
}
@Override
public void onTick() {
if(client)
mc.effectRenderer.clearEffects(mc.world);
}
@Override
public String toString() {
return "TBM:NoParticles";
return "NoParticles";
}
}