Class PlayerActionResponseS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.PlayerActionResponseS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class PlayerActionResponseS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description (package private) PlayerActionC2SPacket.Actionactionprivate booleanapprovedprivate static LoggerLOGGERprivate BlockPosposprivate BlockStatestate -
Constructor Summary
Constructors Constructor Description PlayerActionResponseS2CPacket()PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved, String reason) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)PlayerActionC2SPacket.ActiongetAction()BlockPosgetBlockPos()BlockStategetBlockState()booleanisApproved()voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
LOGGER
-
pos
-
state
-
action
PlayerActionC2SPacket.Action action -
approved
private boolean approved
-
-
Constructor Details
-
PlayerActionResponseS2CPacket
public PlayerActionResponseS2CPacket() -
PlayerActionResponseS2CPacket
public PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved, String reason)
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-
getBlockState
-
getBlockPos
-
isApproved
@Environment(CLIENT) public boolean isApproved() -
getAction
-