improvements to NoParticles
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m29s
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m29s
This commit is contained in:
parent
e5376425ea
commit
75b0b24176
1 changed files with 15 additions and 2 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue