BackwardsCompat
This commit is contained in:
@@ -88,7 +88,12 @@ public abstract class TileSlave extends TileBase implements ISynchronizedContain
|
|||||||
|
|
||||||
if (network == null) {
|
if (network == null) {
|
||||||
if (controller != 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 {
|
} else {
|
||||||
if (controller == null) {
|
if (controller == null) {
|
||||||
|
|||||||
@@ -94,12 +94,16 @@ public class StorageHandler {
|
|||||||
|
|
||||||
int quantityPerRequest = 0;
|
int quantityPerRequest = 0;
|
||||||
|
|
||||||
|
System.out.println("stack:"+stack);
|
||||||
CraftingPattern pattern = network.getPatternWithBestScore(stack);
|
CraftingPattern pattern = network.getPatternWithBestScore(stack);
|
||||||
|
System.out.println("pattern: " +pattern);
|
||||||
|
|
||||||
if (pattern != null) {
|
if (pattern != null) {
|
||||||
for (ItemStack output : pattern.getOutputs()) {
|
for (ItemStack output : pattern.getOutputs()) {
|
||||||
|
System.out.println("output:"+output);
|
||||||
if (RefinedStorageUtils.compareStackNoQuantity(stack, output)) {
|
if (RefinedStorageUtils.compareStackNoQuantity(stack, output)) {
|
||||||
quantityPerRequest += output.stackSize;
|
quantityPerRequest += output.stackSize;
|
||||||
|
System.out.println("QPR:"+quantityPerRequest);
|
||||||
|
|
||||||
if (!pattern.isProcessing()) {
|
if (!pattern.isProcessing()) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user