2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("TileEntityInputter.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.tile;
|
2015-03-19 21:27:56 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
import java.util.Map;
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
import org.cyclops.commoncapabilities.capability.itemhandler.SlotlessItemHandlerConfig;
|
2016-01-08 13:31:58 +01:00
|
|
|
|
2017-02-04 14:12:17 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.network.gui.INumberReactor;
|
2018-08-10 05:04:07 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover;
|
2016-11-16 16:59:00 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
2017-02-04 14:12:17 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper;
|
2015-06-12 19:12:06 +02:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-03-19 21:27:56 +01:00
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2018-06-24 03:23:58 +02:00
|
|
|
import net.minecraft.tileentity.TileEntityFurnace;
|
2016-01-08 08:10:55 +01:00
|
|
|
import net.minecraft.util.EnumFacing;
|
2017-01-18 14:26:56 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2016-07-20 22:14:30 +02:00
|
|
|
import net.minecraftforge.items.CapabilityItemHandler;
|
|
|
|
import net.minecraftforge.items.IItemHandler;
|
2017-02-04 14:12:17 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
public class TileEntityInputter extends TileEntityInventoryBase implements IButtonReactor, INumberReactor {
|
2015-06-28 03:12:32 +02:00
|
|
|
|
2015-10-03 10:16:18 +02:00
|
|
|
public static final int OKAY_BUTTON_ID = 133;
|
2018-06-23 01:39:30 +02:00
|
|
|
private final SlotlessableItemHandlerWrapper wrapper = new SlotlessableItemHandlerWrapper(this.inv, null);
|
2015-10-03 10:16:18 +02:00
|
|
|
public int sideToPut = -1;
|
|
|
|
public int slotToPutStart;
|
|
|
|
public int slotToPutEnd;
|
2017-02-04 14:12:17 +01:00
|
|
|
public Map<EnumFacing, SlotlessableItemHandlerWrapper> placeToPut = new ConcurrentHashMap<EnumFacing, SlotlessableItemHandlerWrapper>();
|
2015-10-03 10:16:18 +02:00
|
|
|
public int sideToPull = -1;
|
|
|
|
public int slotToPullStart;
|
|
|
|
public int slotToPullEnd;
|
2017-02-04 14:12:17 +01:00
|
|
|
public Map<EnumFacing, SlotlessableItemHandlerWrapper> placeToPull = new ConcurrentHashMap<EnumFacing, SlotlessableItemHandlerWrapper>();
|
2015-10-03 10:16:18 +02:00
|
|
|
public boolean isAdvanced;
|
2016-11-27 11:37:55 +01:00
|
|
|
public FilterSettings leftFilter = new FilterSettings(12, true, true, false, false, 0, -1000);
|
|
|
|
public FilterSettings rightFilter = new FilterSettings(12, true, true, false, false, 0, -2000);
|
2015-10-03 10:16:18 +02:00
|
|
|
private int lastPutSide;
|
|
|
|
private int lastPutStart;
|
|
|
|
private int lastPutEnd;
|
|
|
|
private int lastPullSide;
|
|
|
|
private int lastPullStart;
|
|
|
|
private int lastPullEnd;
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
public TileEntityInputter(int slots, String name) {
|
2015-10-03 10:16:18 +02:00
|
|
|
super(slots, name);
|
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
public TileEntityInputter() {
|
2015-10-03 10:16:18 +02:00
|
|
|
super(1, "inputter");
|
|
|
|
this.isAdvanced = false;
|
|
|
|
}
|
|
|
|
|
2015-06-28 03:12:32 +02:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public void onNumberReceived(double number, int textID, EntityPlayer player) {
|
|
|
|
int text = (int) number;
|
2016-12-29 21:29:00 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (text != -1) {
|
|
|
|
if (textID == 0) {
|
2016-06-10 13:57:52 +02:00
|
|
|
this.slotToPutStart = Math.max(text, 0);
|
2016-02-01 21:14:17 +01:00
|
|
|
}
|
2018-08-10 05:04:07 +02:00
|
|
|
if (textID == 1) {
|
2016-06-10 13:57:52 +02:00
|
|
|
this.slotToPutEnd = Math.max(text, 0);
|
2015-07-09 15:55:26 +02:00
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (textID == 2) {
|
2016-06-10 13:57:52 +02:00
|
|
|
this.slotToPullStart = Math.max(text, 0);
|
2016-02-01 21:14:17 +01:00
|
|
|
}
|
2018-08-10 05:04:07 +02:00
|
|
|
if (textID == 3) {
|
2016-06-10 13:57:52 +02:00
|
|
|
this.slotToPullEnd = Math.max(text, 0);
|
2015-07-09 15:55:26 +02:00
|
|
|
}
|
2015-06-28 03:12:32 +02:00
|
|
|
}
|
|
|
|
this.markDirty();
|
|
|
|
}
|
2015-03-19 21:27:56 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
private boolean newPulling() {
|
|
|
|
for (EnumFacing side : this.placeToPull.keySet()) {
|
2017-05-28 01:26:08 +02:00
|
|
|
WorldUtil.doItemInteraction(this.placeToPull.get(side), this.wrapper, Integer.MAX_VALUE, this.slotToPullStart, this.slotToPullEnd, 0, 1, !this.isAdvanced ? null : this.leftFilter);
|
2016-10-29 12:00:00 +02:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.placeToPull instanceof TileEntityItemViewer) {
|
2016-10-29 12:00:00 +02:00
|
|
|
break;
|
|
|
|
}
|
2016-07-20 22:14:30 +02:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
private boolean newPutting() {
|
|
|
|
if (!this.isAdvanced || this.rightFilter.check(this.inv.getStackInSlot(0))) {
|
|
|
|
for (EnumFacing side : this.placeToPut.keySet()) {
|
2017-05-28 01:26:08 +02:00
|
|
|
WorldUtil.doItemInteraction(this.wrapper, this.placeToPut.get(side), Integer.MAX_VALUE, 0, 1, this.slotToPutStart, this.slotToPutEnd, null);
|
2016-10-29 12:00:00 +02:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.placeToPut instanceof TileEntityItemViewer) {
|
2016-10-29 12:00:00 +02:00
|
|
|
break;
|
|
|
|
}
|
2016-07-20 22:14:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-09-09 18:40:09 +02:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public boolean shouldSaveDataOnChangeOrWorldStart() {
|
2016-09-09 18:40:09 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-07-22 18:24:43 +02:00
|
|
|
/**
|
|
|
|
* Sets all of the relevant variables
|
|
|
|
*/
|
2016-09-09 18:40:09 +02:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public void saveDataOnChangeOrWorldStart() {
|
2017-02-04 14:12:17 +01:00
|
|
|
this.placeToPull.clear();
|
|
|
|
this.placeToPut.clear();
|
2017-01-18 14:26:56 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.sideToPull != -1) {
|
2016-07-20 22:14:30 +02:00
|
|
|
EnumFacing side = WorldUtil.getDirectionBySidesInOrder(this.sideToPull);
|
2017-01-18 14:26:56 +01:00
|
|
|
BlockPos offset = this.pos.offset(side);
|
2015-05-04 17:26:50 +02:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.world.isBlockLoaded(offset)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
TileEntity tile = this.world.getTileEntity(offset);
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (tile != null) {
|
|
|
|
for (EnumFacing facing : EnumFacing.values()) {
|
2017-02-04 14:12:17 +01:00
|
|
|
IItemHandler normal = null;
|
2018-08-10 05:04:07 +02:00
|
|
|
if (tile.getClass() == TileEntityFurnace.class) normal = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
|
|
|
else if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
normal = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing);
|
|
|
|
}
|
|
|
|
|
|
|
|
Object slotless = null;
|
2018-08-10 05:04:07 +02:00
|
|
|
if (ActuallyAdditions.commonCapsLoaded) {
|
|
|
|
if (tile.hasCapability(SlotlessItemHandlerConfig.CAPABILITY, facing)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
slotless = tile.getCapability(SlotlessItemHandlerConfig.CAPABILITY, facing);
|
|
|
|
}
|
|
|
|
}
|
2017-01-18 14:26:56 +01:00
|
|
|
|
2017-02-04 14:12:17 +01:00
|
|
|
this.placeToPull.put(facing.getOpposite(), new SlotlessableItemHandlerWrapper(normal, slotless));
|
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.slotToPullEnd <= 0) {
|
|
|
|
if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
IItemHandler cap = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
2018-08-10 05:04:07 +02:00
|
|
|
if (cap != null) {
|
2017-02-04 14:12:17 +01:00
|
|
|
this.slotToPullEnd = cap.getSlots();
|
|
|
|
}
|
2017-01-18 14:26:56 +01:00
|
|
|
}
|
2016-07-23 17:34:37 +02:00
|
|
|
}
|
|
|
|
}
|
2015-10-03 10:16:18 +02:00
|
|
|
}
|
2015-03-19 21:27:56 +01:00
|
|
|
}
|
2016-06-10 13:57:52 +02:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.sideToPut != -1) {
|
2016-07-20 22:14:30 +02:00
|
|
|
EnumFacing side = WorldUtil.getDirectionBySidesInOrder(this.sideToPut);
|
2017-01-18 14:26:56 +01:00
|
|
|
BlockPos offset = this.pos.offset(side);
|
2016-06-10 13:57:52 +02:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.world.isBlockLoaded(offset)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
TileEntity tile = this.world.getTileEntity(offset);
|
2017-01-18 14:26:56 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (tile != null) {
|
|
|
|
for (EnumFacing facing : EnumFacing.values()) {
|
2017-02-04 14:12:17 +01:00
|
|
|
IItemHandler normal = null;
|
2018-08-10 05:04:07 +02:00
|
|
|
if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
normal = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing);
|
|
|
|
}
|
|
|
|
|
|
|
|
Object slotless = null;
|
2018-08-10 05:04:07 +02:00
|
|
|
if (ActuallyAdditions.commonCapsLoaded) {
|
|
|
|
if (tile.hasCapability(SlotlessItemHandlerConfig.CAPABILITY, facing)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
slotless = tile.getCapability(SlotlessItemHandlerConfig.CAPABILITY, facing);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.placeToPut.put(facing.getOpposite(), new SlotlessableItemHandlerWrapper(normal, slotless));
|
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.slotToPutEnd <= 0) {
|
|
|
|
if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) {
|
2017-02-04 14:12:17 +01:00
|
|
|
IItemHandler cap = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
2018-08-10 05:04:07 +02:00
|
|
|
if (cap != null) {
|
2017-02-04 14:12:17 +01:00
|
|
|
this.slotToPutEnd = cap.getSlots();
|
|
|
|
}
|
2017-01-18 14:26:56 +01:00
|
|
|
}
|
2016-07-23 17:34:37 +02:00
|
|
|
}
|
|
|
|
}
|
2015-10-03 10:16:18 +02:00
|
|
|
}
|
2015-03-19 21:27:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-12 19:12:06 +02:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public void onButtonPressed(int buttonID, EntityPlayer player) {
|
2016-07-23 19:20:53 +02:00
|
|
|
this.leftFilter.onButtonPressed(buttonID);
|
|
|
|
this.rightFilter.onButtonPressed(buttonID);
|
2015-06-12 19:12:06 +02:00
|
|
|
|
2015-07-22 18:24:43 +02:00
|
|
|
//Reset the Slots
|
2018-08-10 05:04:07 +02:00
|
|
|
if (buttonID == 0 || buttonID == 1) {
|
2015-06-28 03:12:32 +02:00
|
|
|
this.slotToPutStart = 0;
|
|
|
|
this.slotToPutEnd = 0;
|
|
|
|
}
|
2018-08-10 05:04:07 +02:00
|
|
|
if (buttonID == 2 || buttonID == 3) {
|
2015-06-28 03:12:32 +02:00
|
|
|
this.slotToPullStart = 0;
|
|
|
|
this.slotToPullEnd = 0;
|
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (buttonID == 0) {
|
2015-10-03 10:16:18 +02:00
|
|
|
this.sideToPut++;
|
|
|
|
}
|
2018-08-10 05:04:07 +02:00
|
|
|
if (buttonID == 1) {
|
2015-10-03 10:16:18 +02:00
|
|
|
this.sideToPut--;
|
|
|
|
}
|
2015-03-19 21:27:56 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (buttonID == 2) {
|
2015-10-03 10:16:18 +02:00
|
|
|
this.sideToPull++;
|
|
|
|
}
|
2018-08-10 05:04:07 +02:00
|
|
|
if (buttonID == 3) {
|
2015-10-03 10:16:18 +02:00
|
|
|
this.sideToPull--;
|
|
|
|
}
|
2015-03-19 21:27:56 +01:00
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (this.sideToPut >= 6) {
|
2015-10-02 16:48:01 +02:00
|
|
|
this.sideToPut = -1;
|
2018-08-10 05:04:07 +02:00
|
|
|
} else if (this.sideToPut < -1) {
|
2015-10-02 16:48:01 +02:00
|
|
|
this.sideToPut = 5;
|
2018-08-10 05:04:07 +02:00
|
|
|
} else if (this.sideToPull >= 6) {
|
2015-10-02 16:48:01 +02:00
|
|
|
this.sideToPull = -1;
|
2018-08-10 05:04:07 +02:00
|
|
|
} else if (this.sideToPull < -1) {
|
2015-10-03 10:16:18 +02:00
|
|
|
this.sideToPull = 5;
|
|
|
|
}
|
2015-06-28 03:12:32 +02:00
|
|
|
|
|
|
|
this.markDirty();
|
2016-10-29 12:00:00 +02:00
|
|
|
this.saveDataOnChangeOrWorldStart();
|
2015-03-19 21:27:56 +01:00
|
|
|
}
|
|
|
|
|
2016-02-01 20:32:49 +01:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public void writeSyncableNBT(NBTTagCompound compound, NBTType type) {
|
2016-07-02 15:01:46 +02:00
|
|
|
super.writeSyncableNBT(compound, type);
|
2018-08-10 05:04:07 +02:00
|
|
|
if (type != NBTType.SAVE_BLOCK) {
|
2016-07-02 15:01:46 +02:00
|
|
|
compound.setInteger("SideToPut", this.sideToPut);
|
|
|
|
compound.setInteger("SlotToPut", this.slotToPutStart);
|
|
|
|
compound.setInteger("SlotToPutEnd", this.slotToPutEnd);
|
|
|
|
compound.setInteger("SideToPull", this.sideToPull);
|
|
|
|
compound.setInteger("SlotToPull", this.slotToPullStart);
|
|
|
|
compound.setInteger("SlotToPullEnd", this.slotToPullEnd);
|
|
|
|
}
|
2016-12-03 10:52:03 +01:00
|
|
|
|
|
|
|
this.leftFilter.writeToNBT(compound, "LeftFilter");
|
|
|
|
this.rightFilter.writeToNBT(compound, "RightFilter");
|
2016-02-01 20:32:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public void readSyncableNBT(NBTTagCompound compound, NBTType type) {
|
|
|
|
if (type != NBTType.SAVE_BLOCK) {
|
2016-07-02 15:01:46 +02:00
|
|
|
this.sideToPut = compound.getInteger("SideToPut");
|
|
|
|
this.slotToPutStart = compound.getInteger("SlotToPut");
|
|
|
|
this.slotToPutEnd = compound.getInteger("SlotToPutEnd");
|
|
|
|
this.sideToPull = compound.getInteger("SideToPull");
|
|
|
|
this.slotToPullStart = compound.getInteger("SlotToPull");
|
|
|
|
this.slotToPullEnd = compound.getInteger("SlotToPullEnd");
|
|
|
|
}
|
2016-12-03 10:52:03 +01:00
|
|
|
|
|
|
|
this.leftFilter.readFromNBT(compound, "LeftFilter");
|
|
|
|
this.rightFilter.readFromNBT(compound, "RightFilter");
|
|
|
|
|
2016-07-02 15:01:46 +02:00
|
|
|
super.readSyncableNBT(compound, type);
|
2016-02-01 20:32:49 +01:00
|
|
|
}
|
|
|
|
|
2015-12-01 19:48:09 +01:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public void updateEntity() {
|
2015-12-01 19:48:09 +01:00
|
|
|
super.updateEntity();
|
2018-08-10 05:04:07 +02:00
|
|
|
if (!this.world.isRemote) {
|
2015-12-01 19:48:09 +01:00
|
|
|
|
|
|
|
//Is Block not powered by Redstone?
|
2018-08-10 05:04:07 +02:00
|
|
|
if (!this.isRedstonePowered) {
|
|
|
|
if (this.ticksElapsed % 30 == 0) {
|
|
|
|
if (!(this.sideToPull == this.sideToPut && this.slotToPullStart == this.slotToPutStart && this.slotToPullEnd == this.slotToPutEnd)) {
|
|
|
|
if (!StackUtil.isValid(this.inv.getStackInSlot(0)) && this.sideToPull != -1 && this.placeToPull != null) {
|
2016-12-30 12:43:57 +01:00
|
|
|
this.newPulling();
|
|
|
|
}
|
|
|
|
|
2018-08-10 05:04:07 +02:00
|
|
|
if (StackUtil.isValid(this.inv.getStackInSlot(0)) && this.sideToPut != -1 && this.placeToPut != null) {
|
2016-12-30 12:43:57 +01:00
|
|
|
this.newPutting();
|
|
|
|
}
|
2015-12-01 19:48:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//Update the Client
|
2018-08-10 05:04:07 +02:00
|
|
|
if ((this.sideToPut != this.lastPutSide || this.sideToPull != this.lastPullSide || this.slotToPullStart != this.lastPullStart || this.slotToPullEnd != this.lastPullEnd || this.slotToPutStart != this.lastPutStart || this.slotToPutEnd != this.lastPutEnd || this.leftFilter.needsUpdateSend() || this.rightFilter.needsUpdateSend()) && this.sendUpdateWithInterval()) {
|
2015-12-01 19:48:09 +01:00
|
|
|
this.lastPutSide = this.sideToPut;
|
|
|
|
this.lastPullSide = this.sideToPull;
|
|
|
|
this.lastPullStart = this.slotToPullStart;
|
|
|
|
this.lastPullEnd = this.slotToPullEnd;
|
|
|
|
this.lastPutStart = this.slotToPutStart;
|
|
|
|
this.lastPutEnd = this.slotToPutEnd;
|
2016-07-23 19:20:53 +02:00
|
|
|
this.leftFilter.updateLasts();
|
|
|
|
this.rightFilter.updateLasts();
|
2015-12-01 19:48:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-19 21:27:56 +01:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public IAcceptor getAcceptor() {
|
|
|
|
return (slot, stack, automation) -> !automation || slot == 0;
|
2015-03-19 21:27:56 +01:00
|
|
|
}
|
|
|
|
|
2015-12-19 10:30:39 +01:00
|
|
|
@Override
|
2018-08-10 05:04:07 +02:00
|
|
|
public IRemover getRemover() {
|
|
|
|
return (slot, automation) -> !automation || slot == 0;
|
2015-03-19 21:27:56 +01:00
|
|
|
}
|
2015-06-28 03:12:32 +02:00
|
|
|
}
|