Package appeng.api.behaviors
Interface PickupStrategy
@Experimental
public interface PickupStrategy
Pickup strategies are used to pick up various types of game objects from within the world and convert them into a
subtype of
AEKey
.
This is used by the annihilation plane to pick up in-world fluids, blocks or item entities.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static enum
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPickUpEntity
(net.minecraft.world.entity.Entity entity) Tests if this strategy can pick up the given entity.boolean
pickUpEntity
(IEnergySource energySource, PickupSink sink, net.minecraft.world.entity.Entity entity) Pick up a given entity and place the result into the given pickup sink.static void
register
(AEKeyType type, PickupStrategy.Factory factory) void
reset()
Resets any lock-out caused by throttling of the pickup strategy.tryPickup
(IEnergySource energySource, PickupSink sink)
-
Method Details
-
reset
void reset()Resets any lock-out caused by throttling of the pickup strategy. It is called at least once per tick by the annihilation plane to allow the strategy to reset its lockout timer. -
canPickUpEntity
boolean canPickUpEntity(net.minecraft.world.entity.Entity entity) Tests if this strategy can pick up the given entity. -
pickUpEntity
boolean pickUpEntity(IEnergySource energySource, PickupSink sink, net.minecraft.world.entity.Entity entity) Pick up a given entity and place the result into the given pickup sink. Returns true if the entity was picked up successfully. The strategy has to handle removal or modification of the entity itself. -
tryPickup
-
register
-