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
|
package goodgenerator.blocks.tileEntity.base;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import goodgenerator.client.GUI.LargeFusionComputerGUIClient;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ISecondaryDescribable;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.objects.GT_ChunkManager;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import static com.github.bartimaeusnek.bartworks.util.RecipeFinderForParallel.getMultiOutput;
import static com.github.bartimaeusnek.bartworks.util.RecipeFinderForParallel.handleParallelRecipe;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofFrame;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
public abstract class LargeFusionComputerPP extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable {
public static final String MAIN_NAME = "largeFusionPP";
private boolean isLoadedChunk;
public GT_Recipe mLastRecipe;
public int para;
public long mEUStore;
private static final ClassValue<IStructureDefinition<LargeFusionComputerPP>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<LargeFusionComputerPP>>() {
@Override
protected IStructureDefinition<LargeFusionComputerPP> computeValue(Class<?> type) {
return StructureDefinition.<LargeFusionComputerPP>builder()
.addShape(MAIN_NAME, transpose(new String[][]{
L0, L1, L2, L3, L2, L1, L0
}))
.addElement(
'H', lazy(x -> ofBlock(x.getCoilBlock(), x.getCoilMeta()))
)
.addElement(
'C', lazy(x -> ofBlock(x.getCasingBlock(), x.getCasingMeta()))
)
.addElement(
'B', lazy(x -> ofBlock(x.getGlassBlock(), x.getGlassMeta()))
)
.addElement(
'I', lazy(x -> ofHatchAdderOptional(LargeFusionComputerPP::addInjector, x.textureIndex(), 1, x.getGlassBlock(), x.getGlassMeta()))
)
.addElement(
'O', lazy(x -> ofHatchAdderOptional(LargeFusionComputerPP::addExtractor, x.textureIndex(), 2, x.getGlassBlock(), x.getGlassMeta()))
)
.addElement(
'E', lazy(x -> ofHatchAdderOptional(LargeFusionComputerPP::addEnergyInjector, x.textureIndex(), 3, x.getCasingBlock(), x.getCasingMeta()))
)
.addElement(
'F', lazy(x -> ofFrame(x.getFrameBox()))
)
.build();
}
};
static {
Textures.BlockIcons.setCasingTextureForId(52,
TextureFactory.of(
TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW).extFacing().build(),
TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).extFacing().glow().build()
));
}
public LargeFusionComputerPP(String name) {
super(name);
}
public LargeFusionComputerPP(int id, String name, String nameRegional) {
super(id,name,nameRegional);
}
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new LargeFusionComputerGUIClient(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png");
}
@Override
public abstract long maxEUStore();
public abstract Block getCasingBlock();
public abstract int getCasingMeta();
public abstract Block getCoilBlock();
public abstract int getCoilMeta();
public abstract Block getGlassBlock();
public abstract int getGlassMeta();
public abstract int hatchTier();
public abstract Materials getFrameBox();
public int textureIndex() {
return 53;
};
public abstract ITexture getTextureOverlay();
public abstract int getMaxPara();
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
return aSide != getBaseMetaTileEntity().getFrontFacing();
}
@Override
public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
this.eEnergyMulti.clear();
if (structureCheck_EM(MAIN_NAME, 23, 3, 40) && mInputHatches.size() > 1 && !mOutputHatches.isEmpty() && (mEnergyHatches.size() + eEnergyMulti.size()) != 0) {
fixAllIssue();
return true;
}
return false;
}
public void fixAllIssue() {
mWrench = true;
mScrewdriver = true;
mSoftHammer = true;
mHardHammer = true;
mSolderingTool = true;
mCrowbar = true;
}
@Override
public void construct(ItemStack itemStack, boolean b) {
structureBuild_EM(MAIN_NAME, 23, 3, 40, itemStack, b);
}
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isServerSide() && !aBaseMetaTileEntity.isAllowedToWork()) {
// if machine has stopped, stop chunkloading
GT_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity);
this.isLoadedChunk = false;
}
else if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && !this.isLoadedChunk) {
//load a 3x3 area when machine is running
GT_ChunkManager.releaseTicket((TileEntity)aBaseMetaTileEntity);
int offX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetX;
int offZ = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetZ;
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() + offX, getChunkZ() + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() + 1 + offX, getChunkZ() + 1 + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() + 1 + offX, getChunkZ() + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() + 1 + offX, getChunkZ() - 1 + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() - 1 + offX, getChunkZ() + 1 + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() - 1 + offX, getChunkZ() + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() - 1 + offX, getChunkZ() - 1 + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() + offX, getChunkZ() + 1 + offZ));
GT_ChunkManager.requestChunkLoad((TileEntity)aBaseMetaTileEntity, new ChunkCoordIntPair(getChunkX() + offX, getChunkZ() - 1 + offZ));
this.isLoadedChunk = true;
}
if (aBaseMetaTileEntity.isServerSide()) {
if (aTick % 400 == 0) fixAllIssue();
if (mEfficiency < 0)
mEfficiency = 0;
if (mRunningOnLoad && checkMachine(aBaseMetaTileEntity, mInventory[1])) {
this.mEUStore = aBaseMetaTileEntity.getStoredEU();
checkRecipe(mInventory[1]);
}
if (--mUpdate == 0 || --mStartUpCheck == 0) {
checkStructure(true, aBaseMetaTileEntity);
}
if (mStartUpCheck < 0) {
if (mMachine) {
if (this.mEnergyHatches != null) {
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
if (isValidMetaTileEntity(tHatch)) {
if (aBaseMetaTileEntity.getStoredEU() + (2048L * tierOverclock() * getMaxPara() * extraPara(100)) < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048L * tierOverclock() * getMaxPara() * extraPara(100), false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(2048L * tierOverclock() * getMaxPara() * extraPara(100), true);
} else if (aBaseMetaTileEntity.getStoredEU() + (2048L * tierOverclock()) < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048L * tierOverclock(), false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(2048L * tierOverclock(), true);
}
}
}
if (this.eEnergyMulti != null) {
for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti)
if (isValidMetaTileEntity(tHatch)) {
if (aBaseMetaTileEntity.getStoredEU() + (2048L * tierOverclock() * getMaxPara() * extraPara(100)) < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048L * tierOverclock() * getMaxPara() * extraPara(100), false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(2048L * tierOverclock() * getMaxPara() * extraPara(100), true);
} else if (aBaseMetaTileEntity.getStoredEU() + (2048L * tierOverclock()) < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048L * tierOverclock(), false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(2048L * tierOverclock(), true);
}
}
}
if (this.mEUStore <= 0 && mMaxProgresstime > 0) {
stopMachine();
}
if (mMaxProgresstime > 0) {
this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputItems != null)
for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack);
if (mOutputFluids != null)
for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack);
mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1])));
mOutputItems = null;
mProgresstime = 0;
mMaxProgresstime = 0;
mEfficiencyIncrease = 0;
this.mEUStore = getBaseMetaTileEntity().getStoredEU();
if (aBaseMetaTileEntity.isAllowedToWork())
checkRecipe(mInventory[1]);
}
} else {
if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
turnCasingActive(mMaxProgresstime > 0);
if (aBaseMetaTileEntity.isAllowedToWork()) {
this.mEUStore = getBaseMetaTileEntity().getStoredEU();
if (checkRecipe(mInventory[1])) {
if (this.mEUStore < this.mLastRecipe.mSpecialValue - this.mEUt) {
mMaxProgresstime = 0;
turnCasingActive(false);
}
getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue - this.mEUt, false);
}
}
if (mMaxProgresstime <= 0)
mEfficiency = Math.max(0, mEfficiency - 1000);
}
}
} else {
turnCasingActive(false);
this.mLastRecipe = null;
stopMachine();
}
}
aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
public boolean turnCasingActive(boolean status) {
if (this.mEnergyHatches != null) {
for (GT_MetaTileEntity_Hatch_Energy hatch : this.mEnergyHatches) {
hatch.updateTexture(status ? 52 : 53);
}
}
if (this.eEnergyMulti != null) {
for (GT_MetaTileEntity_Hatch_EnergyMulti hatch : this.eEnergyMulti) {
hatch.updateTexture(status ? 52 : 53);
}
}
if (this.mOutputHatches != null) {
for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
hatch.updateTexture(status ? 52 : 53);
}
}
if (this.mInputHatches != null) {
for (GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) {
hatch.updateTexture(status ? 52 : 53);
}
}
return true;
}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) return new ITexture[]{TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build(), getTextureOverlay()};
if (aActive) return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(52)};
return new ITexture[]{TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build()};
}
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return true;
}
@Override
public void onMachineBlockUpdate() {
mUpdate = 100;
}
@Override
public boolean onRunningTick(ItemStack aStack) {
if (mEUt < 0) {
if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
this.mLastRecipe = null;
this.para = 0;
stopMachine();
return false;
}
}
if (this.mEUStore <= 0) {
this.mLastRecipe = null;
this.para = 0;
stopMachine();
return false;
}
return true;
}
public abstract int tierOverclock();
public abstract int overclock(int mStartEnergy);
public abstract int extraPara(int startEnergy);
@Override
public boolean checkRecipe_EM(ItemStack aStack) {
ArrayList<FluidStack> tFluidList = getStoredFluids();
if (tFluidList.size() > 1) {
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, Integer.MAX_VALUE, tFluids);
if ((tRecipe == null && !mRunningOnLoad) || (maxEUStore() < tRecipe.mSpecialValue)) {
turnCasingActive(false);
this.mLastRecipe = null;
return false;
}
int pall = handleParallelRecipe(tRecipe, tFluids, null, Math.min(getMaxPara() * extraPara(tRecipe.mSpecialValue), (int) (getMaxEUInput() / tRecipe.mEUt / overclock(tRecipe.mSpecialValue))));
this.para = pall;
if (mRunningOnLoad || pall > 0) {
this.mLastRecipe = tRecipe;
this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue) * pall);
this.mMaxProgresstime = Math.max(this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue), 1);
this.mEfficiencyIncrease = 10000;
this.mOutputFluids = getMultiOutput(mLastRecipe, pall).getKey().toArray(new FluidStack[0]);
turnCasingActive(true);
mRunningOnLoad = false;
return true;
}
}
return false;
}
public long getMaxEUInput() {
long sum = 0;
for (GT_MetaTileEntity_Hatch_Energy hatch : mEnergyHatches) {
if (isValidMetaTileEntity(hatch)) {
sum += Math.min(2048L * tierOverclock() * getMaxPara() * extraPara(100), hatch.maxEUInput() * hatch.maxAmperesIn());
}
}
for (GT_MetaTileEntity_Hatch_EnergyMulti hatch : eEnergyMulti) {
if (isValidMetaTileEntity(hatch)) {
sum += Math.min(2048L * tierOverclock() * getMaxPara() * extraPara(100), hatch.maxEUInput() * hatch.maxAmperesIn());
}
}
return sum;
}
@Override
public void onRemoval() {
if (this.isLoadedChunk)
GT_ChunkManager.releaseTicket((TileEntity)getBaseMetaTileEntity());
super.onRemoval();
}
public int getChunkX() {
return getBaseMetaTileEntity().getXCoord() >> 4;
}
public int getChunkZ() {
return getBaseMetaTileEntity().getZCoord() >> 4;
}
private boolean addEnergyInjector(IGregTechTileEntity aBaseMetaTileEntity, int aBaseCasingIndex) {
IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
GT_MetaTileEntity_Hatch_Energy tHatch = (GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity;
if (tHatch.mTier < hatchTier()) return false;
tHatch.updateTexture(aBaseCasingIndex);
return mEnergyHatches.add(tHatch);
}
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) {
GT_MetaTileEntity_Hatch_EnergyMulti tHatch = (GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity;
if (tHatch.mTier < hatchTier()) return false;
tHatch.updateTexture(aBaseCasingIndex);
return eEnergyMulti.add(tHatch);
}
return false;
}
private boolean addInjector(IGregTechTileEntity aBaseMetaTileEntity, int aBaseCasingIndex) {
IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (!(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input)) return false;
GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity;
if (tHatch.mTier < hatchTier()) return false;
tHatch.updateTexture(aBaseCasingIndex);
tHatch.mRecipeMap = getRecipeMap();
return mInputHatches.add(tHatch);
}
private boolean addExtractor(IGregTechTileEntity aBaseMetaTileEntity, int aBaseCasingIndex) {
if (aBaseMetaTileEntity == null) return false;
IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
if (!(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output)) return false;
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity;
if (tHatch.mTier < hatchTier()) return false;
tHatch.updateTexture(aBaseCasingIndex);
return mOutputHatches.add(tHatch);
}
@Override
public IStructureDefinition<LargeFusionComputerPP> getStructure_EM() {
return STRUCTURE_DEFINITION.get(getClass());
}
@Override
public boolean isGivingInformation() {
return true;
}
@Override
public int getMaxEfficiency(ItemStack aStack) {
return 10000;
}
@Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
@Override
public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
@Override
public String[] getInfoData() {
String tier = hatchTier() == 9 ? EnumChatFormatting.BLUE+"IV"+EnumChatFormatting.RESET : EnumChatFormatting.GOLD+"V"+EnumChatFormatting.RESET;
float plasmaOut = 0;
int powerRequired = 0;
if (this.mLastRecipe != null) {
powerRequired = this.mLastRecipe.mEUt * this.para;
if (this.mLastRecipe.getFluidOutput(0) != null) {
plasmaOut = (float)this.mLastRecipe.getFluidOutput(0).amount / (float)this.mLastRecipe.mDuration * this.para;
}
}
return new String[]{
EnumChatFormatting.BLUE + "Fusion Reactor MK " + EnumChatFormatting.RESET + tier,
StatCollector.translateToLocal("scanner.info.UX.0") + ": " +
EnumChatFormatting.LIGHT_PURPLE + GT_Utility.formatNumbers(this.para) + EnumChatFormatting.RESET,
StatCollector.translateToLocal("GT5U.fusion.req") + ": " +
EnumChatFormatting.RED + GT_Utility.formatNumbers(powerRequired) + EnumChatFormatting.RESET + "EU/t",
StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " +
EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mEUStore) + EnumChatFormatting.RESET + " EU / " +
EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEUStore()) + EnumChatFormatting.RESET + " EU",
StatCollector.translateToLocal("GT5U.fusion.plasma") + ": " +
EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(plasmaOut) + EnumChatFormatting.RESET + "L/t"};
}
public static final String[] L0 = {
" ",
" ",
" FCCCCCF ",
" FCIBICF ",
" FCCCCCF ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" FFF FFF ",
" CCC CCC ",
" CIC CIC ",
" CBC CBC ",
" CIC CIC ",
" CCC CCC ",
" FFF FFF ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" FCCCCCF ",
" FCIBICF ",
" FCCCCCF ",
" ",
" ",
};
public static final String[] L1 = {
" ",
" FCBBBCF ",
" CC CC ",
" CCCCC CCCCC ",
" CCCCCCC CCCCCCC ",
" CCCCCCC FCBBBCF CCCCCCC ",
" CCCCC CCCCC ",
" CCCC CCCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" FCCCF FCCCF ",
" C C C C ",
" B B B B ",
" B B B B ",
" B B B B ",
" C C C C ",
" FCCCF FCCCF ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCC CCC ",
" CCCC CCCC ",
" CCCCC CCCCC ",
" CCCCCCC FCBBBCF CCCCCCC ",
" CCCCCCC CCCCCCC ",
" CCCCC CCCCC ",
" CC CC ",
" FCBBBCF ",
" ",
};
public static final String[] L2 = {
" FCCCCCF ",
" CC CC ",
" CCCCC CCCCC ",
" CCCCCHHHHHHHHHCCCCC ",
" CCCCHHHCC CCHHHCCCC ",
" CCCHHCCCCC CCCCCHHCCC ",
" ECHHCCCCC FCCCCCF CCCCCHHCE ",
" CCHCCCC CCCCHCC ",
" CCHCCC CCCHCC ",
" CCHCE ECHCC ",
" ECHCC CCHCE ",
" CCHCE ECHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
"FCCHCCF FCCHCCF",
"C H C C H C",
"C H C C H C",
"C H C C H C",
"C H C C H C",
"C H C C H C",
"FCCHCCF FCCHCCF",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCC CCHCC ",
" CCHCE ECHCC ",
" ECHCC CCHCE ",
" CCHCE ECHCC ",
" CCHCCC CCCHCC ",
" CCHCCCC CCCCHCC ",
" ECHHCCCCC FCCCCCF CCCCCHHCE ",
" CCCHHCCCCC CCCCCHHCCC ",
" CCCCHHHCC CCHHHCCCC ",
" CCCCCHHHHHHHHHCCCCC ",
" CCCCC CCCCC ",
" CC CC ",
" FCCCCCF ",
};
public static final String[] L3 = {
" FCOBOCF ",
" CC CC ",
" CCCHHHHHHHHHCCC ",
" CCHHHHHHHHHHHHHHCCC ",
" CCHHHHHHHHHHHHHHHHHHHCC ",
" CHHHHHHHCC CCHHHHHHHC ",
" CHHHHHCCC FCOBOCF CCCHHHHHC ",
" CHHHHCC CCHHHHC ",
" CHHHCC CCHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
"FCHHHCF FCHHHCF",
"C HHH C C HHH C",
"O HHH O O HHH O",
"B HHH B B HHH B",
"O HHH O O HHH O",
"C HHH C C HHH C",
"FCHHHCF FCHHHCF",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHC CHHHC ",
" CHHHCC CCHHHC ",
" CHHHHCC CCHHHHC ",
" CHHHHHCCC FCO~OCF CCCHHHHHC ",
" CHHHHHHHCC CCHHHHHHHC ",
" CCHHHHHHHHHHHHHHHHHHHCC ",
" CCHHHHHHHHHHHHHHCCC ",
" CCCHHHHHHHHHCCC ",
" CC CC ",
" FCOBOCF ",
};
}
|