BackwardsCompat

This commit is contained in:
Raoul Van den Berge
2016-06-21 23:32:02 +02:00
parent f48bdddfcd
commit c1395c7bb8
2 changed files with 10 additions and 1 deletions

View File

@@ -88,7 +88,12 @@ public abstract class TileSlave extends TileBase implements ISynchronizedContain
if (network == null) {
if (controller != null) {
connect(world, NetworkMasterRegistry.get(controller.getPos(), world.provider.getDimension()));
// For backwards compatiblity
NetworkMaster network = NetworkMasterRegistry.get(controller.getPos(), world.provider.getDimension());
if (network != null) {
connect(world, network);
}
}
} else {
if (controller == null) {

View File

@@ -94,12 +94,16 @@ public class StorageHandler {
int quantityPerRequest = 0;
System.out.println("stack:"+stack);
CraftingPattern pattern = network.getPatternWithBestScore(stack);
System.out.println("pattern: " +pattern);
if (pattern != null) {
for (ItemStack output : pattern.getOutputs()) {
System.out.println("output:"+output);
if (RefinedStorageUtils.compareStackNoQuantity(stack, output)) {
quantityPerRequest += output.stackSize;
System.out.println("QPR:"+quantityPerRequest);
if (!pattern.isProcessing()) {
break;