Class DifficultyS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.DifficultyS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class DifficultyS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private Difficulty
difficulty
private boolean
difficultyLocked
-
Constructor Summary
Constructors Constructor Description DifficultyS2CPacket()
DifficultyS2CPacket(Difficulty difficulty, boolean difficultyLocked)
-
Method Summary
Modifier and Type Method Description void
apply(ClientPlayPacketListener clientPlayPacketListener)
Difficulty
getDifficulty()
boolean
isDifficultyLocked()
void
read(PacketByteBuf buf)
void
write(PacketByteBuf buf)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
difficulty
-
difficultyLocked
private boolean difficultyLocked
-
-
Constructor Details
-
DifficultyS2CPacket
public DifficultyS2CPacket() -
DifficultyS2CPacket
-
-
Method Details
-
apply
- Specified by:
apply
in interfacePacket<ClientPlayPacketListener>
-
read
- Specified by:
read
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
write
- Specified by:
write
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
isDifficultyLocked
@Environment(CLIENT) public boolean isDifficultyLocked() -
getDifficulty
-