Couple fix for bugs founded. (#790)
* Fixed crash placing importer * Fixing exporter's regulator mode loop using wrong index variable
This commit is contained in:
@@ -97,12 +97,13 @@ public class NetworkNodeExporter extends NetworkNode implements IComparable, ITy
|
||||
boolean skipSlot = false;
|
||||
|
||||
if (regulator) {
|
||||
for (int index = 0; i < handler.getSlots() && !skipSlot; i++) {
|
||||
for (int index = 0; index < handler.getSlots(); index++) {
|
||||
ItemStack exporterStack = handler.getStackInSlot(index);
|
||||
|
||||
if (API.instance().getComparer().isEqual(slot, exporterStack, compare)) {
|
||||
if (exporterStack.getCount() >= slot.getCount()) {
|
||||
skipSlot = true;
|
||||
break;
|
||||
} else {
|
||||
stackSize = upgrades.hasUpgrade(ItemUpgrade.TYPE_STACK) ? slot.getCount() - exporterStack.getCount() : 1;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,10 @@ public class NetworkNodeImporter extends NetworkNode implements IComparable, IFi
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
if (network == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == IType.ITEMS) {
|
||||
TileEntity tile = holder.world().getTileEntity(holder.pos().offset(holder.getDirection()));
|
||||
IItemHandler handler = RSUtils.getItemHandler(tile, holder.getDirection().getOpposite());
|
||||
|
||||
Reference in New Issue
Block a user