use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project createaddition by mrh0.
the class TeslaCoilTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
processingBehaviour = new BeltProcessingBehaviour(this).whenItemEnters((s, i) -> TeslaCoilBeltCallbacks.onItemReceived(s, i, this)).whileItemHeld((s, i) -> TeslaCoilBeltCallbacks.whenItemHeld(s, i, this));
behaviours.add(processingBehaviour);
}
use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class BrassTunnelTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
behaviours.add(selectionMode = new ScrollOptionBehaviour<>(SelectionMode.class, Lang.translate("logistics.when_multiple_outputs_available"), this, new CenteredSideValueBoxTransform((state, d) -> d == Direction.UP)));
selectionMode.requiresWrench();
// Propagate settings across connected tunnels
selectionMode.withCallback(setting -> {
for (boolean side : Iterate.trueAndFalse) {
if (!isConnected(side))
continue;
BrassTunnelTileEntity adjacent = getAdjacent(side);
if (adjacent != null)
adjacent.selectionMode.setValue(setting);
}
});
}
use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class EjectorTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
behaviours.add(depotBehaviour = new DepotBehaviour(this));
maxStackSize = new ScrollValueBehaviour(Lang.translate("weighted_ejector.stack_size"), this, new EjectorSlot()).between(0, 64).withFormatter(i -> i == 0 ? "*" : String.valueOf(i)).onlyActiveWhen(() -> state == State.CHARGED).requiresWrench();
behaviours.add(maxStackSize);
depotBehaviour.maxStackSize = () -> maxStackSize.getValue();
depotBehaviour.canAcceptItems = () -> state == State.CHARGED;
depotBehaviour.canFunnelsPullFrom = side -> side != getFacing();
depotBehaviour.enableMerging();
depotBehaviour.addSubBehaviours(behaviours);
}
use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class DeployerTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
filtering = new FilteringBehaviour(this, new DeployerFilterSlot());
behaviours.add(filtering);
processingBehaviour = new BeltProcessingBehaviour(this).whenItemEnters((s, i) -> BeltDeployerCallbacks.onItemReceived(s, i, this)).whileItemHeld((s, i) -> BeltDeployerCallbacks.whenItemHeld(s, i, this));
behaviours.add(processingBehaviour);
}
use of com.simibubi.create.foundation.tileEntity.TileEntityBehaviour in project Create by Creators-of-Create.
the class MechanicalPressTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
processingBehaviour = new BeltProcessingBehaviour(this).whenItemEnters((s, i) -> BeltPressingCallbacks.onItemReceived(s, i, this)).whileItemHeld((s, i) -> BeltPressingCallbacks.whenItemHeld(s, i, this));
behaviours.add(processingBehaviour);
}
Aggregations