Class AbstractBuildingServerMessage<T extends IBuilding>

java.lang.Object
com.ldtteam.common.network.AbstractServerPlayMessage
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<T>
All Implemented Interfaces:
com.ldtteam.common.network.IServerboundDistributor, net.minecraft.network.protocol.common.custom.CustomPacketPayload
Direct Known Subclasses:
AddMinimumStockToBuildingModuleMessage, AddRemoveRecipeMessage, AlterRestaurantMenuItemMessage, AssignFieldMessage, AssignFilterableEntityMessage, AssignFilterableItemMessage, AssignmentModeMessage, AssignUnassignMessage, BuilderSelectWorkOrderMessage, BuildingHiringModeMessage, BuildingSetStyleMessage, BuildPickUpMessage, BuildRequestMessage, ChangeDeliveryPriorityMessage, ChangeRecipePriorityMessage, CourierHiringModeMessage, EnchanterWorkerSetMessage, ForcePickupMessage, GiveToolMessage, GuardSetMinePosMessage, HireFireMessage, HutRenameMessage, MarkBuildingDirtyMessage, MinerRepairLevelMessage, MinerSetLevelMessage, OpenCraftingGUIMessage, PostBoxRequestMessage, QuarryHiringModeMessage, RecallCitizenHutMessage, RecallCitizenMessage, RecallSingleCitizenMessage, RemoveMinimumStockFromBuildingModuleMessage, ResetFilterableItemMessage, SortBuildingMessage, ToggleRecipeMessage, TransferItemsRequestMessage, TryResearchMessage, UpgradeWarehouseMessage

public abstract class AbstractBuildingServerMessage<T extends IBuilding> extends AbstractColonyServerMessage
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload

    net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    AbstractBuildingServerMessage(com.ldtteam.common.network.PlayMessageType<?> type, IBuildingView building)
    Network message for executing things on buildings on the server
     
    AbstractBuildingServerMessage(com.ldtteam.common.network.PlayMessageType<?> type, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimensionId, int colonyId, net.minecraft.core.BlockPos buildingId)
    Network message for executing things on buildings on the server
    protected
    AbstractBuildingServerMessage(net.minecraft.network.RegistryFriendlyByteBuf buf, com.ldtteam.common.network.PlayMessageType<?> type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
    onExecute(net.neoforged.neoforge.network.handling.IPayloadContext ctxIn, net.minecraft.server.level.ServerPlayer player, IColony colony)
     
    protected abstract void
    onExecute(net.neoforged.neoforge.network.handling.IPayloadContext ctxIn, net.minecraft.server.level.ServerPlayer player, IColony colony, T building)
     
    protected void
    toBytes(net.minecraft.network.RegistryFriendlyByteBuf buf)
     
    net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?>
     

    Methods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage

    onExecute, ownerOnly, permissionNeeded

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload

    toVanillaClientbound, toVanillaServerbound, type

    Methods inherited from interface com.ldtteam.common.network.IServerboundDistributor

    sendToServer
  • Constructor Details

    • AbstractBuildingServerMessage

      public AbstractBuildingServerMessage(com.ldtteam.common.network.PlayMessageType<?> type, IBuildingView building)
      Network message for executing things on buildings on the server
      Parameters:
      building - the building we're executing on.
    • AbstractBuildingServerMessage

      public AbstractBuildingServerMessage(com.ldtteam.common.network.PlayMessageType<?> type, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimensionId, int colonyId, net.minecraft.core.BlockPos buildingId)
      Network message for executing things on buildings on the server
      Parameters:
      dimensionId - the ID of the dimension we're executing on.
      colonyId - the ID of the colony we're executing on.
      buildingId - the ID of the building we're executing on.
    • AbstractBuildingServerMessage

      protected AbstractBuildingServerMessage(net.minecraft.network.RegistryFriendlyByteBuf buf, com.ldtteam.common.network.PlayMessageType<?> type)
  • Method Details

    • onExecute

      protected abstract void onExecute(net.neoforged.neoforge.network.handling.IPayloadContext ctxIn, net.minecraft.server.level.ServerPlayer player, IColony colony, T building)
    • toBytes

      protected void toBytes(net.minecraft.network.RegistryFriendlyByteBuf buf)
      Overrides:
      toBytes in class AbstractColonyServerMessage
    • onExecute

      protected final void onExecute(net.neoforged.neoforge.network.handling.IPayloadContext ctxIn, net.minecraft.server.level.ServerPlayer player, IColony colony)
      Specified by:
      onExecute in class AbstractColonyServerMessage
    • type

      public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<?> type()
      Specified by:
      type in interface net.minecraft.network.protocol.common.custom.CustomPacketPayload