aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java
blob: d3412a007a86ce5531e4f5118b156a3d3af06c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
package gtPlusPlus.nei;

import java.awt.Rectangle;
import java.lang.ref.SoftReference;
import java.util.*;
import java.util.stream.Collectors;

import org.lwjgl.opengl.GL11;

import codechicken.lib.gui.GuiDraw;
import codechicken.nei.PositionedStack;
import codechicken.nei.guihook.IContainerInputHandler;
import codechicken.nei.guihook.IContainerTooltipHandler;
import codechicken.nei.recipe.*;
import cpw.mods.fml.common.event.FMLInterModComms;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.objects.ItemData;
import gregtech.api.util.*;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;

public class GTPP_NEI_DefaultHandler extends TemplateRecipeHandler {
	
	public static final int sOffsetX = 5;
	public static final int sOffsetY = 11;
    private SoftReference<List<CachedDefaultRecipe>> mCachedRecipes = null;
	
	private static final HashMap<Integer, Pair<Integer, Integer>> mInputSlotMap = new HashMap<Integer, Pair<Integer, Integer>>();
	private static final HashMap<Integer, Pair<Integer, Integer>> mOutputSlotMap = new HashMap<Integer, Pair<Integer, Integer>>();

	static {
		int[] aSlotX = new int[] {12, 30, 48};
		int[] aSlotY = new int[] {5, 23, 41, 64};	
		// Input slots
		int aIndex = 0;
		for (int y=0; y<aSlotY.length;y++) {
			for (int x=0; x<aSlotX.length;x++) {
				mInputSlotMap.put(aIndex++, new Pair<Integer, Integer>(aSlotX[x], aSlotY[y]));				
			}
		}
		// Output slots
		aSlotX = new int[] {102, 120, 138};
		aIndex = 0;
		for (int y=0; y<aSlotY.length;y++) {
			for (int x=0; x<aSlotX.length;x++) {
				mOutputSlotMap.put(aIndex++, new Pair<Integer, Integer>(aSlotX[x], aSlotY[y]));				
			}
		}
	}

	protected final GT_Recipe_Map mRecipeMap;

	public GTPP_NEI_DefaultHandler(final GT_Recipe_Map tMap) {
		this.mRecipeMap = tMap;
		this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0]));
		if (!NEI_GT_Config.sIsAdded) {
			FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
			GuiCraftingRecipe.craftinghandlers.add(this);
			GuiUsageRecipe.usagehandlers.add(this);
		}
	}

	public static void drawText(final int aX, final int aY, final String aString, final int aColor) {
		Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor);
	}

	@Override
	public TemplateRecipeHandler newInstance() {
		return new GTPP_NEI_DefaultHandler(this.mRecipeMap);
	}
	

    public List<GT_Recipe> getSortedRecipes() {
        List<GT_Recipe> result = new ArrayList<>(this.mRecipeMap.mRecipeList);
        Collections.sort(result);
        return result;
    }
    
    public List<CachedDefaultRecipe> getCache() {
        List<CachedDefaultRecipe> cache;
        if (mCachedRecipes == null || (cache = mCachedRecipes.get()) == null) {
            cache = mRecipeMap.mRecipeList.stream()  // do not use parallel stream. This is already parallelized by NEI
                    .filter(r -> !r.mHidden)
                    .sorted()
                    .map(temp -> {return createCachedRecipe(temp);})
                    .collect(Collectors.toList());
            // while the NEI parallelize handlers, for each individual handler it still uses sequential execution model
            // so we do not need any synchronization here
            mCachedRecipes = new SoftReference<>(cache);
        }
        return cache;
    }
    
    public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) {
    	return new CachedDefaultRecipe(aRecipe);
    }
    
    public void loadCraftingRecipes(String outputId, Object... results) {
        if (outputId.equals(getOverlayIdentifier())) {
            arecipes.addAll(getCache());
        } else {
            super.loadCraftingRecipes(outputId, results);
        }
    }

    public void loadCraftingRecipes(ItemStack aResult) {
        ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult);

        ArrayList<ItemStack> tResults = new ArrayList<>();
        tResults.add(aResult);
        tResults.add(GT_OreDictUnificator.get(true, aResult));
        if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) {
            for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) {
                tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L));
            }
        }
        FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true);
        FluidStack tFluidStack;
        if (tFluid != null) {
            tFluidStack = tFluid;
            tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false));
        }
        else tFluidStack = GT_Utility.getFluidFromDisplayStack(aResult);
        if (tFluidStack != null) {
            tResults.addAll(GT_Utility.getContainersFromFluid(tFluidStack));
        }
        for (CachedDefaultRecipe recipe : getCache()) {
            if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack)))
                arecipes.add(recipe);
        }
    }

    public void loadUsageRecipes(ItemStack aInput) {
        ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput);

        ArrayList<ItemStack> tInputs = new ArrayList<>();
        tInputs.add(aInput);
        tInputs.add(GT_OreDictUnificator.get(false, aInput));
        if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) {
            for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) {
                tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L));
            }
        }
        FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true);
        FluidStack tFluidStack;
        if (tFluid != null) {
            tFluidStack = tFluid;
            tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false));
        }
        else tFluidStack = GT_Utility.getFluidFromDisplayStack(aInput);
        if (tFluidStack != null) {
            tInputs.addAll(GT_Utility.getContainersFromFluid(tFluidStack));
        }
        for (CachedDefaultRecipe recipe : getCache()) {
            if (tInputs.stream().anyMatch(stack -> recipe.contains(recipe.mInputs, stack)))
                arecipes.add(recipe);
        }
    }

	@Override
	public String getOverlayIdentifier() {
		return this.mRecipeMap.mNEIName;
	}

	@Override
	public void drawBackground(final int recipe) {
		GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
		GuiDraw.changeTexture(this.getGuiTexture());
		GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78);
	}

	@Override
	public int recipiesPerPage() {
		return 1;
	}

	@Override
	public String getRecipeName() {
		return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName);
	}

	@Override
	public String getGuiTexture() {
		return this.mRecipeMap.mNEIGUIPath;
	}

	@Override
	public List<String> handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List<String> currenttip, final int aRecipeIndex) {
		final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex);
		if ((tObject instanceof CachedDefaultRecipe)) {
			final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject;
			for (final PositionedStack tStack : tRecipe.mOutputs) {
				if (aStack == tStack.item) {
					if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) {
						break;
					}
					currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%");
					break;
				}
			}
			for (final PositionedStack tStack : tRecipe.mInputs) {
				if (aStack == tStack.item) {
					if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) ||
							(tStack.item.stackSize != 0)) {
						break;
					}
					currenttip.add("Does not get consumed in the process");
					break;
				}
			}
		}
		return currenttip;
	}

	@Override
	public void drawExtras(final int aRecipeIndex) {
		final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt;
		final long tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration;
		if (tEUt != 0) {
			drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216);
			drawText(10, 83, "Usage: " + MathUtils.formatNumbers(tEUt) + " EU/t", -16777216);
			if (this.mRecipeMap.mShowVoltageAmperageInNEI) {
				drawText(10, 93, "Voltage: " + MathUtils.formatNumbers(tEUt / this.mRecipeMap.mAmperage) + " EU", -16777216);
				drawText(10, 103, "Amperage: " + this.mRecipeMap.mAmperage, -16777216);
			} else {
				drawText(10, 93, "Voltage: unspecified", -16777216);
				drawText(10, 103, "Amperage: unspecified", -16777216);
			}
		}
		if (tDuration > 0) {
			drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(0.05d * tDuration)) + " secs", -16777216);
		}
		if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) {
			drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, -16777216);
		}
	}

	@Deprecated
	public static class GT_RectHandler
	implements IContainerInputHandler, IContainerTooltipHandler {
		@Override
		public boolean mouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) {
			return false;
		}

		@Override
		public boolean lastKeyTyped(final GuiContainer gui, final char keyChar, final int keyCode) {
			return false;
		}

		public boolean canHandle(final GuiContainer gui) {
			return false;
		}

		@Override
		public List<String> handleTooltip(final GuiContainer gui, final int mousex, final int mousey, final List<String> currenttip) {
			return currenttip;
		}

		private boolean transferRect(final GuiContainer gui, final boolean usage) {
			return false;
		}

		@Override
		public List<String> handleItemDisplayName(final GuiContainer gui, final ItemStack itemstack, final List<String> currenttip) {
			return currenttip;
		}

		@Override
		public List<String> handleItemTooltip(final GuiContainer gui, final ItemStack itemstack, final int mousex, final int mousey, final List<String> currenttip) {
			return currenttip;
		}

		@Override
		public boolean keyTyped(final GuiContainer gui, final char keyChar, final int keyCode) {
			return false;
		}

		@Override
		public void onKeyTyped(final GuiContainer gui, final char keyChar, final int keyID) {
		}

		@Override
		public void onMouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) {
		}

		@Override
		public void onMouseUp(final GuiContainer gui, final int mousex, final int mousey, final int button) {
		}

		@Override
		public boolean mouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) {
			return false;
		}

		@Override
		public void onMouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) {
		}

		@Override
		public void onMouseDragged(final GuiContainer gui, final int mousex, final int mousey, final int button, final long heldTime) {
		}
	}

	public class FixedPositionedStack
	extends PositionedStack {
		public final int mChance;
		public boolean permutated = false;

		public FixedPositionedStack(final Object object, final int x, final int y) {
			this(object, x, y, 0, true);
		}

		public FixedPositionedStack(final Object object, final int x, final int y, boolean aUnificate) {
			this(object, x, y, 0, aUnificate);
		}

		public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) {
			this(object, x, y, aChance, true);
		}

		public FixedPositionedStack(final Object object, final int x, final int y, final int aChance, boolean aUnificate) {
			super(aUnificate ? GT_OreDictUnificator.getNonUnifiedStacks(object) : object, x, y, true);
			this.mChance = aChance;
		}

		@Override
		public void generatePermutations() {
			if (this.permutated) {
				return;
			}
			final ArrayList<ItemStack> tDisplayStacks = new ArrayList<ItemStack>();
			for (final ItemStack tStack : this.items) {
				if (GT_Utility.isStackValid(tStack)) {
					if (tStack.getItemDamage() == 32767) {
						final List<ItemStack> permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem());
						if (!permutations.isEmpty()) {
							ItemStack stack;
							for (final Iterator<ItemStack> i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) {
								stack = i$.next();
							}
						} else {
							final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize);
							base.stackTagCompound = tStack.stackTagCompound;
							tDisplayStacks.add(base);
						}
					} else {
						tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack}));
					}
				}
			}
			this.items = (tDisplayStacks.toArray(new ItemStack[0]));
			if (this.items.length == 0) {
				this.items = new ItemStack[]{new ItemStack(Blocks.fire)};
			}
			this.permutated = true;
			this.setPermutationToRender(0);
		}
	}

	public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe {
		public final GT_Recipe mRecipe;
		public final List<PositionedStack> mOutputs = new ArrayList<PositionedStack>();
		public final List<PositionedStack> mInputs = new ArrayList<PositionedStack>();

		public CachedDefaultRecipe(final GT_Recipe aRecipe) {
			super();
			this.mRecipe = aRecipe;
			handleSlots();						
		}
		
		public void handleSlots() {
			int tStartIndex = 0;
			switch (GTPP_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) {
			case 0:
				break;
			case 1:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14));
				}
				tStartIndex++;
				break;
			case 2:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14));
				}
				tStartIndex++;
				break;
			case 3:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14));
				}
				tStartIndex++;
				break;
			case 4:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23));
				}
				tStartIndex++;
				break;
			case 5:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23));
				}
				tStartIndex++;
				break;
			case 6:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 23));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23));
				}
				tStartIndex++;
				break;
			case 7:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32));
				}
				tStartIndex++;
				break;
			case 8:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 32));
				}
				tStartIndex++;
				break;
			default:
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, -4));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 14));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 32));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 32));
				}
				tStartIndex++;
				if (mRecipe.getRepresentativeInput(tStartIndex) != null) {
					this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 32));
				}
				tStartIndex++;
			}
			if (mRecipe.mSpecialItems != null) {
				this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52));
			}
			tStartIndex = 0;
			boolean tUnificate = mRecipeMap.mNEIUnificateOutput;
			switch (GTPP_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount) {
			case 0:
				break;
			case 1:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 2:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 3:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 4:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 5:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 6:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 5, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 23, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 7:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			case 8:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 32, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				break;
			default:
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, -4, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 14, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 32, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 32, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
				if (mRecipe.getOutput(tStartIndex) != null) {
					this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 138, 32, mRecipe.getOutputChance(tStartIndex), tUnificate));
				}
				tStartIndex++;
			}


            if ((mRecipe.mFluidInputs.length > 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) {
                this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 48, 52));
                if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) {
                    this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 52));
                }
            }
            if (mRecipe.mFluidOutputs.length > 1) {
                if (mRecipe.mFluidOutputs[0] != null && (mRecipe.mFluidOutputs[0].getFluid() != null)) {
                    this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 120, 5, tUnificate));
                }
                if (mRecipe.mFluidOutputs[1] != null && (mRecipe.mFluidOutputs[1].getFluid() != null)) {
                    this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 138, 5, tUnificate));
                }
                if (mRecipe.mFluidOutputs.length > 2 && mRecipe.mFluidOutputs[2] != null && (mRecipe.mFluidOutputs[2].getFluid() != null)) {
                    this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[2], true), 102, 23, tUnificate));
                }
                if (mRecipe.mFluidOutputs.length > 3 && mRecipe.mFluidOutputs[3] != null && (mRecipe.mFluidOutputs[3].getFluid() != null)) {
                    this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[3], true), 120, 23, tUnificate));
                }
                if (mRecipe.mFluidOutputs.length > 4 && mRecipe.mFluidOutputs[4] != null && (mRecipe.mFluidOutputs[4].getFluid() != null)) {
                    this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[4], true), 138, 23, tUnificate));
                }
            } else if ((mRecipe.mFluidOutputs.length > 0) && (mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) {
                this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 52, tUnificate));
            }	
		}

		@Override
		public List<PositionedStack> getIngredients() {
			return this.getCycledIngredients(GTPP_NEI_DefaultHandler.this.cycleticks / 10, this.mInputs);
		}

		@Override
		public PositionedStack getResult() {
			return null;
		}

		@Override
		public List<PositionedStack> getOtherStacks() {
			return this.mOutputs;
		}
	}

	public class NoCellMultiDefaultRecipe extends CachedDefaultRecipe {

		public NoCellMultiDefaultRecipe(final GT_Recipe aRecipe) {
			super(aRecipe);
			
		}

		@Override
		public void handleSlots() {

			int aInputItemsCount = this.mRecipe.mInputs.length;
			int aInputFluidsCount = this.mRecipe.mFluidInputs.length;			
			int aOutputItemsCount = this.mRecipe.mOutputs.length;
			int aOutputFluidsCount = this.mRecipe.mFluidOutputs.length;
			int aInputSlotsUsed = 0;
			int aOutputSlotsUsed = 0;			
			int aSlotToCheck = 0;	

			// Special Slot
			if (mRecipe.mSpecialItems != null) {
				this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52));
			}
			
			/*
			 * Items
			 */
			
			// Upto 9 Inputs Slots
			if (aInputItemsCount > 0) {				
				if (aInputItemsCount > 9) {
					aInputItemsCount = 9;
				}				
				for (int i=0;i<aInputItemsCount;i++) {
					int x = mInputSlotMap.get(aInputSlotsUsed).getKey();
					int y = mInputSlotMap.get(aInputSlotsUsed).getValue();
					ItemStack aRepStack = mRecipe.getRepresentativeInput(aSlotToCheck++);
					if (aRepStack != null) {
						this.mInputs.add(new FixedPositionedStack(aRepStack, x, y));
						aInputSlotsUsed++;
					}
				}
			}
			aSlotToCheck = 0;	
			// Upto 9 Output Slots
			if (aOutputItemsCount > 0) {			
				if (aOutputItemsCount > 9) {
					aOutputItemsCount = 9;
				}		
				for (int i=0;i<aOutputItemsCount;i++) {
					int x = mOutputSlotMap.get(aOutputSlotsUsed).getKey();
					int y = mOutputSlotMap.get(aOutputSlotsUsed).getValue();
					ItemStack aRepStack = mRecipe.getOutput(aSlotToCheck);
					if (aRepStack != null) {
						this.mOutputs.add(new FixedPositionedStack(aRepStack, x, y, mRecipe.getOutputChance(aSlotToCheck), mRecipeMap.mNEIUnificateOutput));
						aOutputSlotsUsed++;
					}
					aSlotToCheck++;
				}
			}					
			
			/*
			 * Fluids
			 */

			// Upto 9 Fluid Inputs Slots
			aSlotToCheck = aInputSlotsUsed;	
			if (aInputFluidsCount > 0) {				
				for (int i=0;i<aInputFluidsCount;i++) {
					int x = mInputSlotMap.get(aSlotToCheck).getKey();
					int y = mInputSlotMap.get(aSlotToCheck).getValue();
					this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[i], true), x, y));
					aSlotToCheck++;
					aInputSlotsUsed++;
				}
			}
			// Upto 9 Fluid Outputs Slots
			aSlotToCheck = aOutputSlotsUsed;	
			if (aOutputFluidsCount > 0) {				
				for (int i=0;i<aOutputFluidsCount;i++) {
					int x = mOutputSlotMap.get(aSlotToCheck).getKey();
					int y = mOutputSlotMap.get(aSlotToCheck).getValue();
					this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[i], true), x, y, mRecipeMap.mNEIUnificateOutput));
					aSlotToCheck++;
					aOutputSlotsUsed++;
				}
			}
		}
	}
}