Interface IPartTypeWriter<P extends IPartTypeWriter<P,S>,S extends IPartStateWriter<P>>

All Superinterfaces:
INetworkEventListener<IPartNetworkElement<P,S>>, IPartType<P,S>, IPartTypeActiveVariable<P,S>
All Known Implementing Classes:
PartTypeAudioWriter, PartTypeEffectWriter, PartTypeEntityWriter, PartTypeInventoryWriter, PartTypeMachineWriter, PartTypeRedstoneWriter, PartTypeWriteBase

public interface IPartTypeWriter<P extends IPartTypeWriter<P,S>,S extends IPartStateWriter<P>> extends IPartTypeActiveVariable<P,S>
A part type for writers.
  • Method Details

    • getWriteAspects

      List<IAspectWrite> getWriteAspects()
      Returns:
      All possible write aspects that can be used in this part type.
    • getActiveAspect

      IAspectWrite getActiveAspect(PartTarget target, S partState)
      Get the aspect that is currently active in this part, can be null.
      Parameters:
      target - The target block.
      partState - The state of this part.
      Returns:
      The active aspect.
    • updateActivation

      void updateActivation(PartTarget target, S partState, @Nullable net.minecraft.world.entity.player.Player player)
      Update the active aspect and active variable for this part.
      Parameters:
      target - The target block.
      partState - The state of this part.
      player - The player activating the aspect, can be null.