Class PluginMessageClientboundVeinMineResults
java.lang.Object
wtf.choco.veinminer.network.protocol.clientbound.PluginMessageClientboundVeinMineResults
- All Implemented Interfaces:
PluginMessage<ClientboundPluginMessageListener>
public final class PluginMessageClientboundVeinMineResults
extends Object
implements PluginMessage<ClientboundPluginMessageListener>
A client bound
PluginMessage
including the following data:
- VarInt: The amount of block keys
- Array of BlockPosition: The block positions that were vein mined
PluginMessageServerboundRequestVeinMine
.-
Constructor Summary
ConstructorDescriptionConstruct a newPluginMessageClientboundVeinMineResults
with no positions.PluginMessageClientboundVeinMineResults
(@NotNull Collection<BlockPosition> blockPositions) Construct a newPluginMessageClientboundVeinMineResults
.PluginMessageClientboundVeinMineResults
(@NotNull PluginMessageByteBuffer buffer) Construct a newPluginMessageClientboundVeinMineResults
with input. -
Method Summary
Modifier and TypeMethodDescriptionGet aList
of allBlockPositions
resulting from the vein mine.void
handle
(@NotNull ClientboundPluginMessageListener listener) Handle this message.void
write
(@NotNull PluginMessageByteBuffer buffer) Write this plugin message to the providedPluginMessageByteBuffer
.
-
Constructor Details
-
PluginMessageClientboundVeinMineResults
public PluginMessageClientboundVeinMineResults(@NotNull @NotNull Collection<BlockPosition> blockPositions) Construct a newPluginMessageClientboundVeinMineResults
.- Parameters:
blockPositions
- the calculatedBlockPositions
-
PluginMessageClientboundVeinMineResults
public PluginMessageClientboundVeinMineResults()Construct a newPluginMessageClientboundVeinMineResults
with no positions. -
PluginMessageClientboundVeinMineResults
@Internal public PluginMessageClientboundVeinMineResults(@NotNull @NotNull PluginMessageByteBuffer buffer) Construct a newPluginMessageClientboundVeinMineResults
with input.- Parameters:
buffer
- the input buffer
-
-
Method Details
-
getBlockPositions
Get aList
of allBlockPositions
resulting from the vein mine. May be empty if the vein mine was unsuccessful.- Returns:
- the block positions
-
write
Description copied from interface:PluginMessage
Write this plugin message to the providedPluginMessageByteBuffer
.- Specified by:
write
in interfacePluginMessage<ClientboundPluginMessageListener>
- Parameters:
buffer
- the buffer to which data should be written
-
handle
Description copied from interface:PluginMessage
Handle this message.- Specified by:
handle
in interfacePluginMessage<ClientboundPluginMessageListener>
- Parameters:
listener
- the plugin message listener
-