use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class StockpileSwitchTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
filtering = new FilteringBehaviour(this, new FilteredDetectorFilterSlot()).moveText(new Vec3(0, 5, 0)).withCallback($ -> updateCurrentLevel());
behaviours.add(filtering);
InterfaceProvider towardBlockFacing = InterfaceProvider.towardBlockFacing();
behaviours.add(observedInventory = new InvManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class FunnelTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
invManipulation = new InvManipulationBehaviour(this, (w, p, s) -> new BlockFace(p, AbstractFunnelBlock.getFunnelFacing(s).getOpposite()));
behaviours.add(invManipulation);
filtering = new FilteringBehaviour(this, new FunnelFilterSlotPositioning());
filtering.showCountWhen(this::supportsAmountOnFilter);
filtering.onlyActiveWhen(this::supportsFiltering);
behaviours.add(filtering);
behaviours.add(new DirectBeltInputBehaviour(this).onlyInsertWhen(this::supportsDirectBeltInput).setInsertionHandler(this::handleDirectBeltInput));
}
use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class ChassisTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
int max = AllConfigs.SERVER.kinetics.maxChassisRange.get();
range = new BulkScrollValueBehaviour(Lang.translate("generic.range"), this, new CenteredSideValueBoxTransform(), te -> ((ChassisTileEntity) te).collectChassisGroup());
range.requiresWrench();
range.between(1, max);
range.withClientCallback(i -> DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> ChassisRangeDisplay.display(this)));
range.value = max / 2;
behaviours.add(range);
}
Aggregations