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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected com.google.common.base.Predicate<net.minecraft.world.level.block.entity.BlockEntity> protected booleanprotected TFields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
blockEntity -
Constructor Summary
ConstructorsConstructorDescriptionCapManipulationBehaviourBase(SmartBlockEntity be, CapManipulationBehaviourBase.InterfaceProvider target) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract net.neoforged.neoforge.capabilities.BlockCapability<T, net.minecraft.core.Direction> voidintnet.createmod.catnip.math.BlockFaceGet the target of this is behavior, which is the face of the owner BlockEntity that acts as the interface.booleanvoidvoidlazyTick()protected booleanvoidonNeighborChanged(net.minecraft.core.BlockPos neighborPos) simulate()Only simulate the upcoming operationvoidtick()withFilter(com.google.common.base.Predicate<net.minecraft.world.level.block.entity.BlockEntity> filter) Methods inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
destroy, get, get, getPos, getRequiredItems, getType, getWorld, isSafeNBT, onBlockChanged, read, setLazyTickRate, unload, write, writeSafe
-
Field Details
-
target
-
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
-
CapManipulationBehaviourBase
public CapManipulationBehaviourBase(SmartBlockEntity be, CapManipulationBehaviourBase.InterfaceProvider target)
-
-
Method Details
-
capability
protected abstract net.neoforged.neoforge.capabilities.BlockCapability<T,net.minecraft.core.Direction> capability() -
initialize
public void initialize()- Overrides:
initializein classBlockEntityBehaviour
-
onNeighborChanged
public void onNeighborChanged(net.minecraft.core.BlockPos neighborPos) - Overrides:
onNeighborChangedin classBlockEntityBehaviour
-
bypassSidedness
-
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
-
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:
lazyTickin classBlockEntityBehaviour
-
tick
public void tick()- Overrides:
tickin classBlockEntityBehaviour
-
getAmountFromFilter
public int getAmountFromFilter() -
getModeFromFilter
-
findNewCapability
public void findNewCapability()
-