Class TryResearchMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<BuildingUniversity>
com.minecolonies.core.network.messages.server.colony.building.university.TryResearchMessage
- All Implemented Interfaces:
IMessage
Message for the research execution.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for forgeTryResearchMessage(IBuildingView building, @NotNull net.minecraft.resources.ResourceLocation researchId, net.minecraft.resources.ResourceLocation branch, boolean reset) Construct a message to attempt to research. -
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, BuildingUniversity 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
-
TryResearchMessage
public TryResearchMessage()Default constructor for forge -
TryResearchMessage
public TryResearchMessage(IBuildingView building, @NotNull @NotNull net.minecraft.resources.ResourceLocation researchId, net.minecraft.resources.ResourceLocation branch, boolean reset) Construct a message to attempt to research.- Parameters:
researchId- the research id.branch- the research branch.building- the building we're executing on.
-
-
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, BuildingUniversity building) - Specified by:
onExecutein classAbstractBuildingServerMessage<BuildingUniversity>
-