mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Add ClientUpdateCommandBlockMinecartPacket
This commit is contained in:
parent
8e58a9155d
commit
f00f25ad69
2 changed files with 51 additions and 1 deletions
|
@ -44,6 +44,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSpecta
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSteerBoatPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSteerVehiclePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientUpdateCommandBlockMinecartPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientUpdateSignPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientVehicleMovePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerAdvancementTabPacket;
|
||||
|
@ -476,7 +477,7 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
this.registerOutgoing(0x20, ClientSetBeaconEffectPacket.class);
|
||||
this.registerOutgoing(0x21, ClientPlayerChangeHeldItemPacket.class);
|
||||
this.registerOutgoing(0x22, ClientUpdateCommandBlockPacket.class);
|
||||
// FIXME: 23
|
||||
this.registerOutgoing(0x23, ClientUpdateCommandBlockMinecartPacket.class);
|
||||
this.registerOutgoing(0x24, ClientCreativeInventoryActionPacket.class);
|
||||
// FIXME: 25
|
||||
this.registerOutgoing(0x26, ClientUpdateSignPacket.class);
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
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 ClientUpdateCommandBlockMinecartPacket extends MinecraftPacket {
|
||||
private int entityId;
|
||||
private String command;
|
||||
private boolean doesTrackOutput;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private ClientUpdateCommandBlockMinecartPacket() {
|
||||
}
|
||||
|
||||
public ClientUpdateCommandBlockMinecartPacket(int entityId, String command, boolean doesTrackOutput) {
|
||||
this.entityId = entityId;
|
||||
this.command = command;
|
||||
this.doesTrackOutput = doesTrackOutput;
|
||||
}
|
||||
|
||||
public int getEntityId() {
|
||||
return this.entityId;
|
||||
}
|
||||
|
||||
public String getCommand() {
|
||||
return this.command;
|
||||
}
|
||||
|
||||
public boolean isDoesTrackOutput() {
|
||||
return this.doesTrackOutput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(NetInput in) throws IOException {
|
||||
this.entityId = in.readVarInt();
|
||||
this.command = in.readString();
|
||||
this.doesTrackOutput = in.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(NetOutput out) throws IOException {
|
||||
out.writeVarInt(this.entityId);
|
||||
out.writeString(this.command);
|
||||
out.writeBoolean(this.doesTrackOutput);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue