mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Add ClientSetBeaconEffectPacket
This commit is contained in:
parent
16fa0aab9d
commit
a111addeb4
2 changed files with 43 additions and 1 deletions
|
@ -35,6 +35,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientMoveI
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientPrepareCraftingGridPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientRenameItemPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientSelectTradePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientSetBeaconEffectPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientWindowActionPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientBlockNBTRequestPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientEntityNBTRequestPacket;
|
||||
|
@ -471,7 +472,7 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
this.registerOutgoing(0x1D, ClientResourcePackStatusPacket.class);
|
||||
this.registerOutgoing(0x1E, ClientAdvancementTabPacket.class);
|
||||
this.registerOutgoing(0x1F, ClientSelectTradePacket.class);
|
||||
// FIXME: 20
|
||||
this.registerOutgoing(0x20, ClientSetBeaconEffectPacket.class);
|
||||
this.registerOutgoing(0x21, ClientPlayerChangeHeldItemPacket.class);
|
||||
// FIXME: 22
|
||||
// FIXME: 23
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.github.steveice10.mc.protocol.packet.ingame.client.window;
|
||||
|
||||
import com.github.steveice10.mc.protocol.packet.MinecraftPacket;
|
||||
import com.github.steveice10.packetlib.io.NetInput;
|
||||
import com.github.steveice10.packetlib.io.NetOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ClientSetBeaconEffectPacket extends MinecraftPacket {
|
||||
private int primaryEffect;
|
||||
private int secondaryEffect;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private ClientSetBeaconEffectPacket() {
|
||||
}
|
||||
|
||||
public ClientSetBeaconEffectPacket(int primaryEffect, int secondaryEffect) {
|
||||
this.primaryEffect = primaryEffect;
|
||||
this.secondaryEffect = secondaryEffect;
|
||||
}
|
||||
|
||||
public int getPrimaryEffect() {
|
||||
return this.primaryEffect;
|
||||
}
|
||||
|
||||
public int getSecondaryEffect() {
|
||||
return this.secondaryEffect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(NetInput in) throws IOException {
|
||||
this.primaryEffect = in.readVarInt();
|
||||
this.secondaryEffect = in.readVarInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(NetOutput out) throws IOException {
|
||||
out.writeVarInt(this.primaryEffect);
|
||||
out.writeVarInt(this.secondaryEffect);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue