BackwardsCompat
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user