Class MinerRepairLevelMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<BuildingMiner>
com.minecolonies.core.network.messages.server.colony.building.miner.MinerRepairLevelMessage
- All Implemented Interfaces:
IMessage
Message to repair the level of the miner from the GUI.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor used when registering theMinerRepairLevelMessage(@NotNull IBuildingView building, int level) Creates object for the miner set level -
Method Summary
Modifier and TypeMethodDescriptionvoidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.protected voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, BuildingMiner building) voidtoBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.Methods inherited from class com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage
errorIfCastFails, fromBytesAbstractOverride, onExecute, toBytesAbstractOverrideMethods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
fromBytes, getExecutionSide, onExecute, ownerOnly, permissionNeeded, toBytes
-
Constructor Details
-
MinerRepairLevelMessage
public MinerRepairLevelMessage()Empty constructor used when registering the -
MinerRepairLevelMessage
Creates object for the miner set level- Parameters:
building- View of the building to read data from.level- Level of the miner.
-
-
Method Details
-
fromBytesOverride
public void fromBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Description copied from class:AbstractColonyServerMessageTransformation from a byteStream to the variables.- Specified by:
fromBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
toBytesOverride
public void toBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Description copied from class:AbstractColonyServerMessageTransformation to a byteStream.- Specified by:
toBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
onExecute
protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, BuildingMiner building) - Specified by:
onExecutein classAbstractBuildingServerMessage<BuildingMiner>
-