Class CapManipulationBehaviourBase<T,S extends CapManipulationBehaviourBase<?,?>>

java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
com.simibubi.create.foundation.blockEntity.behaviour.inventory.CapManipulationBehaviourBase<T,S>
Direct Known Subclasses:
InvManipulationBehaviour, TankManipulationBehaviour

public abstract class CapManipulationBehaviourBase<T,S extends CapManipulationBehaviourBase<?,?>> extends BlockEntityBehaviour
  • Field Details

    • target

    • targetCapability

      protected T targetCapability
    • filter

      protected com.google.common.base.Predicate<net.minecraft.world.level.block.entity.BlockEntity> filter
    • simulateNext

      protected boolean simulateNext
    • bypassSided

      protected boolean bypassSided
  • Constructor Details

  • Method Details

    • capability

      protected abstract net.neoforged.neoforge.capabilities.BlockCapability<T,net.minecraft.core.Direction> capability()
    • initialize

      public void initialize()
      Overrides:
      initialize in class BlockEntityBehaviour
    • onNeighborChanged

      public void onNeighborChanged(net.minecraft.core.BlockPos neighborPos)
      Overrides:
      onNeighborChanged in class BlockEntityBehaviour
    • bypassSidedness

      public S bypassSidedness()
    • simulate

      public S simulate()
      Only simulate the upcoming operation
    • withFilter

      public S withFilter(com.google.common.base.Predicate<net.minecraft.world.level.block.entity.BlockEntity> filter)
    • hasInventory

      public boolean hasInventory()
    • getInventory

      @Nullable public T getInventory()
    • getTarget

      public net.createmod.catnip.math.BlockFace getTarget()
      Get the target of this is behavior, which is the face of the owner BlockEntity that acts as the interface. To get the BlockFace to use for capability lookup, call getOpposite on the result.
    • onHandlerInvalidated

      protected boolean onHandlerInvalidated()
    • lazyTick

      public void lazyTick()
      Overrides:
      lazyTick in class BlockEntityBehaviour
    • tick

      public void tick()
      Overrides:
      tick in class BlockEntityBehaviour
    • getAmountFromFilter

      public int getAmountFromFilter()
    • getModeFromFilter

      public ItemHelper.ExtractionCountMode getModeFromFilter()
    • findNewCapability

      public void findNewCapability()