Some bugfixes
This commit is contained in:
@@ -27,7 +27,7 @@ public class SideButtonMode extends SideButton {
|
|||||||
|
|
||||||
if (config.getMode() == ModeConstants.WHITELIST) {
|
if (config.getMode() == ModeConstants.WHITELIST) {
|
||||||
tx = 0;
|
tx = 0;
|
||||||
} else if (config.getMode() == ModeConstants.WHITELIST) {
|
} else if (config.getMode() == ModeConstants.BLACKLIST) {
|
||||||
tx = 16;
|
tx = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class TileDestructor extends TileMachine implements ICompareConfig, IMode
|
|||||||
private InventorySimple upgradesInventory = new InventorySimple("upgrades", 4, this);
|
private InventorySimple upgradesInventory = new InventorySimple("upgrades", 4, this);
|
||||||
|
|
||||||
private int compare = 0;
|
private int compare = 0;
|
||||||
private int mode = ModeConstants.BLACKLIST;
|
private int mode = ModeConstants.WHITELIST;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getEnergyUsage() {
|
public int getEnergyUsage() {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class TileDiskDrive extends TileMachine implements IStorageProvider, ISto
|
|||||||
|
|
||||||
private int priority = 0;
|
private int priority = 0;
|
||||||
private int compare = 0;
|
private int compare = 0;
|
||||||
private int mode = ModeConstants.BLACKLIST;
|
private int mode = ModeConstants.WHITELIST;
|
||||||
|
|
||||||
public NBTStorage getStorage(int slot) {
|
public NBTStorage getStorage(int slot) {
|
||||||
if (inventory.getStackInSlot(slot) == null) {
|
if (inventory.getStackInSlot(slot) == null) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
|
|||||||
|
|
||||||
private int priority = 0;
|
private int priority = 0;
|
||||||
private int compare = 0;
|
private int compare = 0;
|
||||||
private int mode = ModeConstants.BLACKLIST;
|
private int mode = ModeConstants.WHITELIST;
|
||||||
|
|
||||||
private int stored = 0;
|
private int stored = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class TileImporter extends TileMachine implements ICompareConfig, IModeCo
|
|||||||
private InventorySimple upgradesInventory = new InventorySimple("upgrades", 4, this);
|
private InventorySimple upgradesInventory = new InventorySimple("upgrades", 4, this);
|
||||||
|
|
||||||
private int compare = 0;
|
private int compare = 0;
|
||||||
private int mode = ModeConstants.BLACKLIST;
|
private int mode = ModeConstants.WHITELIST;
|
||||||
|
|
||||||
private int currentSlot;
|
private int currentSlot;
|
||||||
|
|
||||||
@@ -46,9 +46,9 @@ public class TileImporter extends TileMachine implements ICompareConfig, IModeCo
|
|||||||
if (handler.getSlots() > 0) {
|
if (handler.getSlots() > 0) {
|
||||||
ItemStack stack = handler.getStackInSlot(currentSlot);
|
ItemStack stack = handler.getStackInSlot(currentSlot);
|
||||||
|
|
||||||
if (stack == null) {
|
if (stack == null || !ModeFilter.respectsMode(inventory, this, compare, stack)) {
|
||||||
currentSlot++;
|
currentSlot++;
|
||||||
} else if (ticks % RefinedStorageUtils.getSpeed(upgradesInventory) == 0 && ModeFilter.respectsMode(inventory, this, compare, stack)) {
|
} else if (ticks % RefinedStorageUtils.getSpeed(upgradesInventory) == 0) {
|
||||||
ItemStack result = handler.extractItem(currentSlot, 1, true);
|
ItemStack result = handler.extractItem(currentSlot, 1, true);
|
||||||
|
|
||||||
if (result != null && controller.push(result)) {
|
if (result != null && controller.push(result)) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
|
|||||||
|
|
||||||
private int priority = 0;
|
private int priority = 0;
|
||||||
private int compare = 0;
|
private int compare = 0;
|
||||||
private int mode = ModeConstants.BLACKLIST;
|
private int mode = ModeConstants.WHITELIST;
|
||||||
private int stored;
|
private int stored;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package refinedstorage.tile.config;
|
package refinedstorage.tile.config;
|
||||||
|
|
||||||
public class ModeConstants {
|
public class ModeConstants {
|
||||||
public static final int BLACKLIST = 0;
|
public static final int WHITELIST = 0;
|
||||||
public static final int WHITELIST = 1;
|
public static final int BLACKLIST = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user