Class AssignFilterableEntityMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<AbstractBuilding>
com.minecolonies.core.network.messages.server.colony.building.AssignFilterableEntityMessage
- All Implemented Interfaces:
IMessage
Message which handles the assignment of entities to filterable entity lists.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty standard constructor.AssignFilterableEntityMessage(IBuildingView building, int id, net.minecraft.resources.ResourceLocation entity, boolean assign) Creates the message to add an entity. -
Method Summary
Modifier and TypeMethodDescriptionvoidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, AbstractBuilding 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
-
AssignFilterableEntityMessage
public AssignFilterableEntityMessage()Empty standard constructor. -
AssignFilterableEntityMessage
public AssignFilterableEntityMessage(IBuildingView building, int id, net.minecraft.resources.ResourceLocation entity, boolean assign) Creates the message to add an entity.- Parameters:
id- the id of the list of filterables.assign- compost if true, dont if false.entity- the entity to assignbuilding- 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
public void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, AbstractBuilding building) - Specified by:
onExecutein classAbstractBuildingServerMessage<AbstractBuilding>
-