public class BlockEventPacket extends java.lang.Object implements BedrockPacket
eventType: (Instrument)data: 0-15
- 0 (Piano)
- 1 (Base Drum)
- 2 (Sticks)
- 3 (Drum)
- 4 (Bass)
eventType: 1 (Chest open/closed)
data: 0 or 1
eventType: 1 (Cool down)
data: n/a
| Constructor and Description |
|---|
BlockEventPacket() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
BlockEventPacket |
clone()
Creates a new instance of this packet using Object.clone()
Will throw a
UnsupportedOperationException if the packet implements ReferenceCounted |
boolean |
equals(java.lang.Object o) |
org.cloudburstmc.math.vector.Vector3i |
getBlockPosition()
Position to execute block event.
|
int |
getEventData()
Data used by event (if applicable)
|
int |
getEventType()
Block event type to execute
|
BedrockPacketType |
getPacketType() |
org.cloudburstmc.protocol.common.PacketSignal |
handle(BedrockPacketHandler handler) |
int |
hashCode() |
void |
setBlockPosition(org.cloudburstmc.math.vector.Vector3i blockPosition)
Position to execute block event.
|
void |
setEventData(int eventData)
Data used by event (if applicable)
|
void |
setEventType(int eventType)
Block event type to execute
|
java.lang.String |
toString() |
public final org.cloudburstmc.protocol.common.PacketSignal handle(BedrockPacketHandler handler)
handle in interface BedrockPacketpublic BedrockPacketType getPacketType()
getPacketType in interface BedrockPacketpublic BlockEventPacket clone()
BedrockPacketUnsupportedOperationException if the packet implements ReferenceCountedclone in interface BedrockPacketclone in class java.lang.Objectpublic org.cloudburstmc.math.vector.Vector3i getBlockPosition()
public int getEventType()
public int getEventData()
public void setBlockPosition(org.cloudburstmc.math.vector.Vector3i blockPosition)
blockPosition - block event positionpublic void setEventType(int eventType)
eventType - block event typepublic void setEventData(int eventData)
eventData - data for eventpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object