Interface RebarCargoBlock
-
- All Implemented Interfaces:
-
io.github.pylonmc.rebar.block.base.RebarEntityHolderBlock,io.github.pylonmc.rebar.block.base.RebarLogisticBlock
public interface RebarCargoBlock implements RebarLogisticBlock, RebarEntityHolderBlock
Represents a block that can connect to cargo ducts and use them to interface with other RebarCargoBlocks.
Each face can have one logistic group which cargo ducts (or other RebarCargoBlocks) connected to that face are allowed to interface with.
In your place constructor, you will need to call addCargoLogisticGroup for all the block faces you want to be able to connect cargo ducts to, and also
setCargoTransferRateto set the maximum number of items that can be transferred out of this block per cargo tick.
-
-
Method Summary
Modifier and Type Method Description default voidaddCargoLogisticGroup(BlockFace face, String group)default voidremoveCargoLogisticGroup(BlockFace face)default LogisticGroupgetCargoLogisticGroup(BlockFace face)default voidonDuctConnected(RebarCargoConnectEvent event, EventPriority priority)default voidonDuctDisconnected(RebarCargoDisconnectEvent event, EventPriority priority)default Map<BlockFace, String>getCargoLogisticGroups()default IntegergetCargoTransferRate()default voidsetCargoTransferRate(Integer transferRate)Note that cargoTransferRate will be multiplied by RebarConfig.CARGO_TRANSFER_RATE_MULTIPLIER, and the result will be the maximum number of items that can be transferred out of this block per cargo tick. default Map<String, UUID>getHeldEntities()-
Methods inherited from class io.github.pylonmc.rebar.block.base.RebarLogisticBlock
createLogisticGroup, createLogisticGroup, createLogisticGroup, createLogisticGroup, getLogisticGroup, getLogisticGroupOrThrow, getLogisticGroups -
Methods inherited from class io.github.pylonmc.rebar.block.base.RebarEntityHolderBlock
addEntity, addEntity, areAllHeldEntitiesLoaded, getHeldEntity, getHeldEntity, getHeldEntityOrThrow, getHeldEntityOrThrow, getHeldEntityUuid, getHeldEntityUuidOrThrow, getHeldRebarEntity, getHeldRebarEntityOrThrow, isHeldEntityPresent, tryRemoveAllEntities, tryRemoveEntity, whenHeldRebarEntityLoads, whenHeldRebarEntityLoads -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
addCargoLogisticGroup
@ApiStatus.NonExtendable() default void addCargoLogisticGroup(BlockFace face, String group)
-
removeCargoLogisticGroup
@ApiStatus.NonExtendable() default void removeCargoLogisticGroup(BlockFace face)
-
getCargoLogisticGroup
@ApiStatus.NonExtendable() default LogisticGroup getCargoLogisticGroup(BlockFace face)
-
onDuctConnected
@ApiStatus.NonExtendable() default void onDuctConnected(RebarCargoConnectEvent event, EventPriority priority)
-
onDuctDisconnected
@ApiStatus.NonExtendable() default void onDuctDisconnected(RebarCargoDisconnectEvent event, EventPriority priority)
-
getCargoLogisticGroups
@ApiStatus.NonExtendable() default Map<BlockFace, String> getCargoLogisticGroups()
-
getCargoTransferRate
@ApiStatus.NonExtendable() default Integer getCargoTransferRate()
-
setCargoTransferRate
@ApiStatus.NonExtendable() default void setCargoTransferRate(Integer transferRate)
Note that cargoTransferRate will be multiplied by RebarConfig.CARGO_TRANSFER_RATE_MULTIPLIER, and the result will be the maximum number of items that can be transferred out of this block per cargo tick.
-
getHeldEntities
@ApiStatus.NonExtendable() default Map<String, UUID> getHeldEntities()
-
-
-
-