aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2023-04-01 18:11:43 +0200
committerGitHub <noreply@github.com>2023-04-01 18:11:43 +0200
commit5f50e4a36ec000657b0a1664784acf00275293c6 (patch)
tree5ef81441032735438c9fd9c620224ca58e46e537 /src/main/java/gregtech/common/tileentities
parent6b77557e0e87cf5afd9ebd3985323ff1249e615c (diff)
downloadGT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.gz
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.bz2
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.zip
update spotless formatting (#1827)
Diffstat (limited to 'src/main/java/gregtech/common/tileentities')
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java98
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java53
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java120
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java122
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java140
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java162
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java57
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java56
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java20
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java50
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java104
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java25
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java56
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java177
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java30
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java91
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java52
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java175
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java423
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java52
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java79
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java87
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java22
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java54
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java142
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java108
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java147
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java321
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java31
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java66
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java111
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java53
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java114
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java213
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java120
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java174
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java71
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java316
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java181
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java58
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java346
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java130
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java155
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java41
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java62
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java46
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java122
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java259
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java191
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java75
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java26
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java1144
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java254
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java233
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java147
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java136
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java89
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java58
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java144
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java72
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java72
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java64
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java64
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java56
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java91
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java90
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java69
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java302
104 files changed, 6752 insertions, 3455 deletions
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
index 52cc1b1b96..f1641bda0b 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
@@ -65,7 +65,10 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer impl
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_CHESTBUFFER),
- TextureFactory.builder().addIcon(AUTOMATION_CHESTBUFFER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_CHESTBUFFER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -122,8 +125,9 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer impl
addInvertRedstoneButton(builder);
addStockingModeButton(builder);
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(69, true)).setPos(80, 60)
- .setSize(69, 22));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(69, true))
+ .setPos(80, 60)
+ .setSize(69, 22));
addMainUI(builder);
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
index 70e2673421..6fc2b45289 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
@@ -61,7 +61,10 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_FILTER),
- TextureFactory.builder().addIcon(AUTOMATION_FILTER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_FILTER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -119,45 +122,70 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement
builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
bInvertFilter = !bInvertFilter;
if (bInvertFilter) {
- GT_Utility.sendChatToPlayer(widget.getContext().getPlayer(), GT_Utility.trans("124", "Invert Filter"));
+ GT_Utility.sendChatToPlayer(
+ widget.getContext()
+ .getPlayer(),
+ GT_Utility.trans("124", "Invert Filter"));
} else {
GT_Utility.sendChatToPlayer(
- widget.getContext().getPlayer(),
+ widget.getContext()
+ .getPlayer(),
GT_Utility.trans("125", "Don't invert Filter"));
}
- }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER).setPos(61, 62)
- .setSize(18, 18)).widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- bIgnoreNBT = !bIgnoreNBT;
- if (bIgnoreNBT) {
- GT_Utility.sendChatToPlayer(
- widget.getContext().getPlayer(),
- GT_Utility.trans("126", "Ignore NBT"));
- } else {
- GT_Utility.sendChatToPlayer(
- widget.getContext().getPlayer(),
- GT_Utility.trans("127", "NBT has to match"));
- }
- }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT).setPos(79, 62)
- .setSize(18, 18))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(9, false))
- .setPos(6, 19).setSize(9, 24))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(24, true))
- .setPos(71, 19).setSize(24, 24))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true))
- .setPos(152, 19).setSize(19, 24))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(16, 4)
- .setSize(54, 54))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(9).endAtSlot(17).phantom(true)
+ })
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER)
+ .setPos(61, 62)
+ .setSize(18, 18))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ bIgnoreNBT = !bIgnoreNBT;
+ if (bIgnoreNBT) {
+ GT_Utility.sendChatToPlayer(
+ widget.getContext()
+ .getPlayer(),
+ GT_Utility.trans("126", "Ignore NBT"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ widget.getContext()
+ .getPlayer(),
+ GT_Utility.trans("127", "NBT has to match"));
+ }
+ })
+ .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT)
+ .setPos(79, 62)
+ .setSize(18, 18))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(9, false))
+ .setPos(6, 19)
+ .setSize(9, 24))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(24, true))
+ .setPos(71, 19)
+ .setSize(24, 24))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true))
+ .setPos(152, 19)
+ .setSize(19, 24))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
+ .setPos(16, 4)
+ .setSize(54, 54))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .startFromSlot(9)
+ .endAtSlot(17)
+ .phantom(true)
.applyForWidget(
- widget -> widget.disableShiftInsert().setBackground(GT_UITextures.TRANSPARENT))
- .build().setPos(16, 4))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build()
+ widget -> widget.disableShiftInsert()
+ .setBackground(GT_UITextures.TRANSPARENT))
+ .build()
+ .setPos(16, 4))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .startFromSlot(0)
+ .endAtSlot(8)
+ .build()
.setPos(97, 4));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
index e601847a72..97bf8190b0 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
@@ -68,7 +68,10 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR),
- TextureFactory.builder().addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -188,8 +191,9 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
addEmitRedstoneButton(builder);
addInvertRedstoneButton(builder);
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(87, true)).setPos(62, 60)
- .setSize(87, 22));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(87, true))
+ .setPos(62, 60)
+ .setSize(87, 22));
addInventorySlots(builder);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java
index 7502ae73de..00f1700d98 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java
@@ -76,7 +76,10 @@ public class GT_MetaTileEntity_RecipeFilter extends GT_MetaTileEntity_SpecialFil
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_RECIPEFILTER),
- TextureFactory.builder().addIcon(AUTOMATION_RECIPEFILTER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_RECIPEFILTER_GLOW)
+ .glow()
+ .build());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
index af4426932a..e743dd47e4 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
@@ -66,7 +66,10 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_REGULATOR),
- TextureFactory.builder().addIcon(AUTOMATION_REGULATOR_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_REGULATOR_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -171,21 +174,33 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem
addEmitEnergyButton(builder);
builder.widget(createChargerSlot(43, 62));
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(84, true)).setPos(65, 60)
- .setSize(84, 22))
- .widget(SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build().setPos(7, 5))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(62, 5)
- .setSize(54, 54))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 3).phantom(true).startFromSlot(9).endAtSlot(17)
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(84, true))
+ .setPos(65, 60)
+ .setSize(84, 22))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .startFromSlot(0)
+ .endAtSlot(8)
+ .build()
+ .setPos(7, 5))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
+ .setPos(62, 5)
+ .setSize(54, 54))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .phantom(true)
+ .startFromSlot(9)
+ .endAtSlot(17)
.applyForWidget(
widget -> widget.setControlsAmount(true)
- .setBackground(GT_UITextures.TRANSPARENT))
- .build().setPos(62, 5))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(117, 5)
- .setSize(54, 54));
+ .setBackground(GT_UITextures.TRANSPARENT))
+ .build()
+ .setPos(62, 5))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
+ .setPos(117, 5)
+ .setSize(54, 54));
int xBase = 117, yBase = 5;
for (int i = 0; i < mTargetSlots.length; i++) {
@@ -202,10 +217,12 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem
mTargetSlots[index]
+ (clickData.mouseButton == 0 ? -1 : 1) * (clickData.shift ? 16 : 1)));
}
- }.setBackground(GT_UITextures.TRANSPARENT).setPos(xPos, yPos)).widget(
- TextWidget.dynamicString(() -> String.valueOf(mTargetSlots[index]))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(xPos + 2 + (i % 3 == 0 ? 1 : 0), yPos + 3 + (i / 3 == 0 ? 1 : 0)));
+ }.setBackground(GT_UITextures.TRANSPARENT)
+ .setPos(xPos, yPos))
+ .widget(
+ TextWidget.dynamicString(() -> String.valueOf(mTargetSlots[index]))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(xPos + 2 + (i % 3 == 0 ? 1 : 0), yPos + 3 + (i / 3 == 0 ? 1 : 0)));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
index cefd3152c1..1b913af896 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
@@ -57,7 +57,10 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_SUPERBUFFER),
- TextureFactory.builder().addIcon(AUTOMATION_SUPERBUFFER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_SUPERBUFFER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -82,7 +85,8 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
for (Map.Entry<GT_Utility.ItemId, Integer> entry : slots.entrySet()) {
do {
int slot = validSlots.get(i);
- mInventory[slot] = stacks.get(entry.getKey()).copy();
+ mInventory[slot] = stacks.get(entry.getKey())
+ .copy();
int toSet = Math.min(entry.getValue(), mInventory[slot].getMaxStackSize());
mInventory[slot].stackSize = toSet;
entry.setValue(entry.getValue() - toSet);
@@ -94,6 +98,8 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
@Override
protected void addMainUI(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SUPER_BUFFER).setPos(61, 4).setSize(54, 54));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SUPER_BUFFER)
+ .setPos(61, 4)
+ .setSize(54, 54));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
index 64b5a43ad8..609342ed82 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
@@ -78,7 +78,10 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_TYPEFILTER),
- TextureFactory.builder().addIcon(AUTOMATION_TYPEFILTER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_TYPEFILTER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -128,8 +131,8 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte
}
this.mInventory[SPECIAL_SLOT_INDEX] = GT_Utility.copyAmount(
1L,
- this.mPrefix.mPrefixedItems
- .get(this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size()));
+ this.mPrefix.mPrefixedItems.get(
+ this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size()));
if (this.mInventory[SPECIAL_SLOT_INDEX] == null) return;
if (this.mInventory[SPECIAL_SLOT_INDEX].getItemDamage() == W) this.mInventory[9].setItemDamage(0);
this.mInventory[SPECIAL_SLOT_INDEX].setStackDisplayName(this.mPrefix.toString());
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
index 2519afd4a5..ed22d41f70 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
@@ -135,7 +135,8 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
fill(Materials.Water.getFluid(1000L * (long) aPlayer.getCurrentEquippedItem().stackSize), true);
if (!aPlayer.capabilities.isCreativeMode) {
- aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket);
+ aPlayer.getCurrentEquippedItem()
+ .func_150996_a(Items.bucket);
}
} else {
GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
@@ -197,7 +198,8 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) {
- return GregTech_API.getCoverBehaviorNew(aCover.toStack()).isSimpleCover();
+ return GregTech_API.getCoverBehaviorNew(aCover.toStack())
+ .isSimpleCover();
}
@Override
@@ -328,13 +330,20 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
if (mSteam == null || mSteam.amount == 0) return;
IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide((byte) aSide);
if (tTileEntity == null) return;
- FluidStack tDrained = aBaseMetaTileEntity
- .drain(ForgeDirection.getOrientation(aSide), Math.max(1, this.mSteam.amount / 2), false);
+ FluidStack tDrained = aBaseMetaTileEntity.drain(
+ ForgeDirection.getOrientation(aSide),
+ Math.max(1, this.mSteam.amount / 2),
+ false);
if (tDrained == null) return;
- int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false);
+ int tFilledAmount = tTileEntity.fill(
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
+ tDrained,
+ false);
if (tFilledAmount <= 0) return;
tTileEntity.fill(
- ForgeDirection.getOrientation(aSide).getOpposite(),
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true),
true);
}
@@ -378,13 +387,16 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
if (aIndex == GT_MetaTileEntity_Boiler.SOUND_EVENT_LET_OFF_EXCESS_STEAM) {
GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 2, 1.0F, aX, aY, aZ);
- new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD).setWorld(getBaseMetaTileEntity().getWorld())
- .setMotion(0D, 0D, 0D).<ParticleEventBuilder>times(
- 8,
- x -> x.setPosition(
- aX - 0.5D + XSTR_INSTANCE.nextFloat(),
- aY,
- aZ - 0.5D + XSTR_INSTANCE.nextFloat()).run());
+ new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .setMotion(0D, 0D, 0D)
+ .<ParticleEventBuilder>times(
+ 8,
+ x -> x.setPosition(
+ aX - 0.5D + XSTR_INSTANCE.nextFloat(),
+ aY,
+ aZ - 0.5D + XSTR_INSTANCE.nextFloat())
+ .run());
}
}
@@ -442,48 +454,58 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setPos(43, 25)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
- .widget(
- new SlotWidget(inventoryHandler, 1).setPos(
- 43,
- 61).setBackground(
- getGUITextureSet().getItemSlot(),
- getOverlaySlotOut()))
- .widget(createFuelSlot()).widget(
- createAshSlot())
- .widget(
- new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
- .setTexture(
- getProgressbarEmpty(),
- GT_UITextures.PROGRESSBAR_BOILER_STEAM,
- 10)
- .setDirection(ProgressBar.Direction.UP).setPos(70, 25).setSize(10, 54))
- .widget(
- new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
- .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
- .widget(
- new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
- .setDirection(ProgressBar.Direction.UP).setPos(96, 25).setSize(10, 54))
- .widget(
- new ProgressBar()
- // cap minimum so that one can easily see there's fuel remaining
- .setProgress(
- () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5)
- : 0)
- .setTexture(getProgressbarFuel(), 14).setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45).setSize(14, 14))
- .widget(new DrawableWidget().setDrawable(getOverlaySlotCanister()).setPos(43, 43).setSize(18, 18));
+ .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setPos(43, 61)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ getOverlaySlotOut()))
+ .widget(createFuelSlot())
+ .widget(createAshSlot())
+ .widget(
+ new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(70, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(83, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(96, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar()
+ // cap minimum so that one can easily see there's fuel remaining
+ .setProgress(
+ () -> mProcessingEnergy > 0
+ ? Math.max((float) mProcessingEnergy / 1000, 1f / 5)
+ : 0)
+ .setTexture(getProgressbarFuel(), 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(116, 45)
+ .setSize(14, 14))
+ .widget(
+ new DrawableWidget().setDrawable(getOverlaySlotCanister())
+ .setPos(43, 43)
+ .setSize(18, 18));
}
protected SlotWidget createFuelSlot() {
- return (SlotWidget) new SlotWidget(inventoryHandler, 2).setPos(115, 61).setBackground(getFuelSlotBackground());
+ return (SlotWidget) new SlotWidget(inventoryHandler, 2).setPos(115, 61)
+ .setBackground(getFuelSlotBackground());
}
protected SlotWidget createAshSlot() {
- return (SlotWidget) new SlotWidget(inventoryHandler, 3).setAccess(true, false).setPos(115, 25)
- .setBackground(getAshSlotBackground());
+ return (SlotWidget) new SlotWidget(inventoryHandler, 3).setAccess(true, false)
+ .setPos(115, 25)
+ .setBackground(getAshSlotBackground());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index e88a35c617..0e617312df 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -62,9 +62,15 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
texTop = { TextureFactory.of(MACHINE_BRONZEBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
texSide = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
texFront = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT),
- TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build() },
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_GLOW)
+ .glow()
+ .build() },
texFrontActive = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
@@ -126,9 +132,13 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
}
@@ -206,38 +216,55 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
} else if (
// If its a block of the following materials
GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal))
- || GT_OreDictUnificator
- .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Lignite))
- || GT_OreDictUnificator
- .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))
- || GT_OreDictUnificator
- .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Diamond))
+ || GT_OreDictUnificator.isItemStackInstanceOf(
+ this.mInventory[2],
+ OrePrefixes.block.get(Materials.Lignite))
+ || GT_OreDictUnificator.isItemStackInstanceOf(
+ this.mInventory[2],
+ OrePrefixes.block.get(Materials.Charcoal))
+ || GT_OreDictUnificator.isItemStackInstanceOf(
+ this.mInventory[2],
+ OrePrefixes.block.get(Materials.Diamond))
||
// if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block
(Block.getBlockFromItem(this.mInventory[2].getItem()) != null && // check if the block exists
- (Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase()
- .contains("tile") && // check if the block is a tile -> block
+ (Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("tile") && // check if the block is a tile -> block
(
// If the name of the block contains these names
- Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase()
- .contains("charcoal")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("coal")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("diamond")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("coke")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("railcraft.cube")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("lignite"))))) {
+ Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("charcoal")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("coal")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("diamond")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("coke")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("railcraft.cube")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("lignite"))))) {
// try to add 10% of the burnvalue as Processing energy, no boost
// for coal coke here
if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10)
> 0) {
- this.mProcessingEnergy += (TileEntityFurnace
- .getItemBurnTime(this.mInventory[2]) / 10);
+ this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(
+ this.mInventory[2]) / 10);
aBaseMetaTileEntity.decrStackSize(2, 1);
aBaseMetaTileEntity.addStackToSlot(
3,
@@ -252,7 +279,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
|| Block.getBlockFromItem(
this.mInventory[2].getItem())
.getUnlocalizedName()
- .toLowerCase().contains("coal")
+ .toLowerCase()
+ .contains("coal")
|| Block.getBlockFromItem(
this.mInventory[2].getItem())
.getUnlocalizedName()
@@ -268,22 +296,28 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
// same goes for lava
} else
if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])) >= 2000
- && !(this.mInventory[2].getUnlocalizedName().toLowerCase().contains("bucket")
- || this.mInventory[2].getUnlocalizedName().toLowerCase().contains("cell"))) {
- this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10);
- aBaseMetaTileEntity.decrStackSize(2, 1);
- // adds tiny pile of ash for burntime under 10k, small pile for under 100k and pile for
- // bigger values
- if (XSTR.XSTR_INSTANCE.nextInt(2) == 0) aBaseMetaTileEntity.addStackToSlot(
- 3,
- GT_OreDictUnificator.get(
- (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 10000
- ? TileEntityFurnace.getItemBurnTime(this.mInventory[2])
- >= 100000 ? OrePrefixes.dust : OrePrefixes.dustSmall
- : OrePrefixes.dustTiny),
- Materials.Ash,
- 1L));
- }
+ && !(this.mInventory[2].getUnlocalizedName()
+ .toLowerCase()
+ .contains("bucket")
+ || this.mInventory[2].getUnlocalizedName()
+ .toLowerCase()
+ .contains("cell"))) {
+ this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(
+ this.mInventory[2]) / 10);
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ // adds tiny pile of ash for burntime under 10k, small pile for
+ // under 100k and pile for
+ // bigger values
+ if (XSTR.XSTR_INSTANCE.nextInt(2) == 0)
+ aBaseMetaTileEntity.addStackToSlot(
+ 3,
+ GT_OreDictUnificator.get(
+ (TileEntityFurnace.getItemBurnTime(
+ this.mInventory[2])
+ >= 10000 ? TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 100000 ? OrePrefixes.dust : OrePrefixes.dustSmall : OrePrefixes.dustTiny),
+ Materials.Ash,
+ 1L));
+ }
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
index 9e17dc12ee..b6b293d8d1 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
@@ -124,8 +124,10 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
rTextures[3][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation),
TextureFactory.of(BOILER_LAVA_FRONT, colorModulation), TextureFactory.of(BOILER_LAVA_FRONT_GLOW) };
rTextures[4][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation),
- TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE), TextureFactory.builder()
+ .addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
rTextures[5][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation),
TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN) };
}
@@ -222,13 +224,14 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
if (returnedItemStack != null && !aPlayer.capabilities.isCreativeMode) {
if (equippedItemStack.stackSize > 1) {
if (!aPlayer.inventory.addItemStackToInventory(returnedItemStack)) {
- aBaseMetaTileEntity.getWorld().spawnEntityInWorld(
- new EntityItem(
- aBaseMetaTileEntity.getWorld(),
- (double) aBaseMetaTileEntity.getXCoord() + 0.5D,
- (double) aBaseMetaTileEntity.getYCoord() + 1.5D,
- (double) aBaseMetaTileEntity.getZCoord() + 0.5D,
- equippedItemStack));
+ aBaseMetaTileEntity.getWorld()
+ .spawnEntityInWorld(
+ new EntityItem(
+ aBaseMetaTileEntity.getWorld(),
+ (double) aBaseMetaTileEntity.getXCoord() + 0.5D,
+ (double) aBaseMetaTileEntity.getYCoord() + 1.5D,
+ (double) aBaseMetaTileEntity.getZCoord() + 0.5D,
+ equippedItemStack));
} else if (aPlayer instanceof EntityPlayerMP) {
((EntityPlayerMP) aPlayer).sendContainerToPlayer(aPlayer.inventoryContainer);
}
@@ -243,7 +246,10 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- if (lavaTank.getFluid() != null) aNBT.setTag("mLava", lavaTank.getFluid().writeToNBT(new NBTTagCompound()));
+ if (lavaTank.getFluid() != null) aNBT.setTag(
+ "mLava",
+ lavaTank.getFluid()
+ .writeToNBT(new NBTTagCompound()));
aNBT.setInteger("mCooledLava", this.mCooledLava);
}
@@ -264,7 +270,9 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
if (mSteam == null || mSteam.amount == 0) return;
pushSteamToSide(
aBaseMetaTileEntity,
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).getOpposite().ordinal());
+ ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())
+ .getOpposite()
+ .ordinal());
}
/**
@@ -352,9 +360,13 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
}
@@ -401,7 +413,7 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
if (aIndex != GT_MetaTileEntity_Boiler.SOUND_EVENT_LET_OFF_EXCESS_STEAM) return;
final ForgeDirection rearDirection = ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing())
- .getOpposite();
+ .getOpposite();
GT_Utility.doSoundAtClient(
SoundResource.RANDOM_FIZZ,
2,
@@ -411,12 +423,18 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
aY,
aZ + 0.5 * rearDirection.offsetZ);
- new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD).setWorld(getBaseMetaTileEntity().getWorld())
- // Particles emitted with a 1 block/s velocity toward rear
- .setMotion(rearDirection.offsetX / 20D, 0D, rearDirection.offsetZ / 20D).<ParticleEventBuilder>times(
- 8,
- // Particles emitted from center of rear face (Steam Output)
- x -> x.setPosition(aX + rearDirection.offsetX / 2D, aY, aZ + rearDirection.offsetZ / 2D).run());
+ new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ // Particles emitted with a 1 block/s velocity toward rear
+ .setMotion(rearDirection.offsetX / 20D, 0D, rearDirection.offsetZ / 20D)
+ .<ParticleEventBuilder>times(
+ 8,
+ // Particles emitted from center of rear face (Steam Output)
+ x -> x.setPosition(
+ aX + rearDirection.offsetX / 2D,
+ aY,
+ aZ + rearDirection.offsetZ / 2D)
+ .run());
}
@Override
@@ -464,39 +482,53 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setPos(43, 25)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
- .widget(
- new SlotWidget(inventoryHandler, 1).setAccess(true, false).setPos(43, 61)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotOut()))
- .widget(
- new FluidSlotWidget(lavaTank)
- .setBackground(getGUITextureSet().getFluidSlot(), getOverlaySlotIn()).setPos(115, 61))
- .widget(
- createAshSlot())
- .widget(
- new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
- .setTexture(
- getProgressbarEmpty(),
- GT_UITextures.PROGRESSBAR_BOILER_STEAM,
- 10)
- .setDirection(ProgressBar.Direction.UP).setPos(70, 25).setSize(10, 54))
- .widget(
- new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
- .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
- .widget(
- new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
- .setDirection(ProgressBar.Direction.UP).setPos(96, 25).setSize(10, 54))
- .widget(
- new ProgressBar()
- // cap minimum so that one can easily see there's fuel remaining
- .setProgress(
- () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5)
- : 0)
- .setTexture(getProgressbarFuel(), 14).setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45).setSize(14, 14))
- .widget(new DrawableWidget().setDrawable(getOverlaySlotCanister()).setPos(43, 43).setSize(18, 18));
+ .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setAccess(true, false)
+ .setPos(43, 61)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ getOverlaySlotOut()))
+ .widget(
+ new FluidSlotWidget(lavaTank)
+ .setBackground(
+ getGUITextureSet().getFluidSlot(),
+ getOverlaySlotIn())
+ .setPos(115, 61))
+ .widget(createAshSlot())
+ .widget(
+ new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(70, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(83, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(96, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar()
+ // cap minimum so that one can easily see there's fuel remaining
+ .setProgress(
+ () -> mProcessingEnergy > 0
+ ? Math.max((float) mProcessingEnergy / 1000, 1f / 5)
+ : 0)
+ .setTexture(getProgressbarFuel(), 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(116, 45)
+ .setSize(14, 14))
+ .widget(
+ new DrawableWidget().setDrawable(getOverlaySlotCanister())
+ .setPos(43, 43)
+ .setSize(18, 18));
}
static class LavaTank extends FluidTank {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
index 746f0602d6..04fa676c16 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
@@ -100,7 +100,8 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
return String.format(
localizedDescFormat,
GT_Utility.formatNumbers(getMaxOutputPerSecond()),
- GT_Utility.formatNumbers(getMinOutputPerSecond())).split("\\R");
+ GT_Utility.formatNumbers(getMinOutputPerSecond()))
+ .split("\\R");
}
public int getMinOutputPerSecond() {
@@ -278,7 +279,8 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
GT_Utility.formatNumbers(getHotTimeSeconds()),
GT_Utility.formatNumbers(getMinOutputPerSecond()),
GT_Utility.formatNumbers(getMaxOutputPerSecond()),
- GT_Utility.formatNumbers(getProductionPerSecond())).split("\\R");
+ GT_Utility.formatNumbers(getProductionPerSecond()))
+ .split("\\R");
}
public int getHeatCapacityPercent() {
@@ -368,9 +370,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
protected int get(final String aCategory, final String aKey, final int aDefaultValue,
final String... aComments) {
final StringBuilder tCommentBuilder = new StringBuilder();
- for (String tComment : aComments) tCommentBuilder.append(tComment).append('\n');
- tCommentBuilder.append("Default: ").append(aDefaultValue);
- return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString()).getInt();
+ for (String tComment : aComments) tCommentBuilder.append(tComment)
+ .append('\n');
+ tCommentBuilder.append("Default: ")
+ .append(aDefaultValue);
+ return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString())
+ .getInt();
}
public int getCalcificationTicks() {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index 719fd13317..42e0fc6117 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -43,9 +43,15 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro
texTop = { TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
texSide = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
texFront = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT),
- TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build() },
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_GLOW)
+ .glow()
+ .build() },
texFrontActive = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java
index de144caf11..ef57f40e65 100644
--- a/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java
+++ b/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java
@@ -85,13 +85,20 @@ public class InventoryUpgrade extends UpgradeCasing {
@Override
public void addUIWidgets(Builder builder, UIBuildContext buildContext) {
- builder.widget(new TextFieldWidget().setGetter(() -> mInventoryName).setSetter((val) -> {
- mInventoryName = val;
- final IMultiBlockController controller = getTarget(false);
- if (controller != null) {
- controller.changeInventoryName(mInventoryName, mInventoryID.toString(), mType);
- }
- }).setSize(100, 25).setPos(50, 30));
+ builder.widget(
+ new TextFieldWidget().setGetter(() -> mInventoryName)
+ .setSetter((val) -> {
+ mInventoryName = val;
+ final IMultiBlockController controller = getTarget(false);
+ if (controller != null) {
+ controller.changeInventoryName(
+ mInventoryName,
+ mInventoryID.toString(),
+ mType);
+ }
+ })
+ .setSize(100, 25)
+ .setPos(50, 30));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
index fbc2e4af14..5f77c09e15 100644
--- a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
+++ b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
@@ -72,11 +72,17 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- aSide != aFacing ? TextureFactory.of(
- TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE).glow().build())
- : TextureFactory.of(
- TextureFactory.builder().addIcon(Textures.BlockIcons.STRUCTURE_MARK).glow().build()) };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aSide != aFacing
+ ? TextureFactory.of(
+ TextureFactory.builder()
+ .addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE)
+ .glow()
+ .build())
+ : TextureFactory.of(
+ TextureFactory.builder()
+ .addIcon(Textures.BlockIcons.STRUCTURE_MARK)
+ .glow()
+ .build()) };
}
@Override
@@ -126,8 +132,8 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isServerSide()) {
- ExtendedFacing writerFacing = ExtendedFacing
- .of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()));
+ ExtendedFacing writerFacing = ExtendedFacing.of(
+ ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()));
double[] abc = new double[3];
double[] xyz = new double[3];
boundingBox.dim = aBaseMetaTileEntity.getWorld().provider.dimensionId;
@@ -174,7 +180,8 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
numbers[0],
numbers[1],
numbers[2],
- te -> te.getClass().getCanonicalName(),
+ te -> te.getClass()
+ .getCanonicalName(),
numbers[3],
numbers[4],
numbers[5],
@@ -233,56 +240,86 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 112).setPos(43, 4))
- .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (getBaseMetaTileEntity().isServerSide()) {
- printStructure(widget.getContext().getPlayer());
- }
- }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PRINT).setSize(18, 18)
- .setPos(11, 128)
- .addTooltip(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.print.tooltip")))
- .widget(
- new CycleButtonWidget().setToggle(() -> transpose, aBoolean -> transpose = aBoolean)
- .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TRANSPOSE).setSize(18, 18)
- .setPos(32, 128).addTooltip(
- translateToLocal(
- "GT5U.machines.advdebugstructurewriter.gui.transpose.tooltip")))
- .widget(
- new CycleButtonWidget()
- .setToggle(() -> showHighlightBox, aBoolean -> showHighlightBox = aBoolean)
- .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BOUNDING_BOX).setSize(18, 18)
- .setPos(53, 128).addTooltip(
- translateToLocal(
- "GT5U.machines.advdebugstructurewriter.gui.highlight.tooltip")))
- .widget(
- new MultiChildWidget().addChild(
- new TextWidget(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.origin"))
- .setDefaultColor(0xf0f0ff).setPos(0, 0))
- .addChild(
- TextWidget.dynamicString(() -> "A: " + numbers[0]).setDefaultColor(0xf0f0ff)
- .setPos(0, 10))
- .addChild(
- TextWidget.dynamicString(() -> "B: " + numbers[1]).setDefaultColor(0xf0f0ff)
- .setPos(0, 18))
- .addChild(
- TextWidget.dynamicString(() -> "C: " + numbers[2]).setDefaultColor(0xf0f0ff)
- .setPos(0, 26))
- .addChild(
- new TextWidget(
- translateToLocal("GT5U.machines.advdebugstructurewriter.gui.size"))
- .setDefaultColor(0xf0f0ff).setPos(0, 52))
- .addChild(
- TextWidget.dynamicString(() -> "A: " + numbers[3]).setDefaultColor(0xf0f0ff)
- .setPos(0, 62))
- .addChild(
- TextWidget.dynamicString(() -> "B: " + numbers[4]).setDefaultColor(0xf0f0ff)
- .setPos(0, 70))
- .addChild(
- TextWidget.dynamicString(() -> "C: " + numbers[5]).setDefaultColor(0xf0f0ff)
- .setPos(0, 78))
- .setPos(46, 8));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setSize(90, 112)
+ .setPos(43, 4))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (getBaseMetaTileEntity().isServerSide()) {
+ printStructure(
+ widget.getContext()
+ .getPlayer());
+ }
+ })
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_PRINT)
+ .setSize(18, 18)
+ .setPos(11, 128)
+ .addTooltip(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.print.tooltip")))
+ .widget(
+ new CycleButtonWidget().setToggle(() -> transpose, aBoolean -> transpose = aBoolean)
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TRANSPOSE)
+ .setSize(18, 18)
+ .setPos(32, 128)
+ .addTooltip(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.transpose.tooltip")))
+ .widget(
+ new CycleButtonWidget().setToggle(
+ () -> showHighlightBox,
+ aBoolean -> showHighlightBox = aBoolean)
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BOUNDING_BOX)
+ .setSize(18, 18)
+ .setPos(53, 128)
+ .addTooltip(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.highlight.tooltip")))
+ .widget(
+ new MultiChildWidget().addChild(
+ new TextWidget(
+ translateToLocal("GT5U.machines.advdebugstructurewriter.gui.origin"))
+ .setDefaultColor(
+ 0xf0f0ff)
+ .setPos(
+ 0,
+ 0))
+ .addChild(
+ TextWidget.dynamicString(() -> "A: " + numbers[0])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 10))
+ .addChild(
+ TextWidget.dynamicString(() -> "B: " + numbers[1])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 18))
+ .addChild(
+ TextWidget.dynamicString(() -> "C: " + numbers[2])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 26))
+ .addChild(
+ new TextWidget(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.size")).setDefaultColor(
+ 0xf0f0ff)
+ .setPos(
+ 0,
+ 52))
+ .addChild(
+ TextWidget.dynamicString(() -> "A: " + numbers[3])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 62))
+ .addChild(
+ TextWidget.dynamicString(() -> "B: " + numbers[4])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 70))
+ .addChild(
+ TextWidget.dynamicString(() -> "C: " + numbers[5])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 78))
+ .setPos(46, 8));
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, 16, 1, 133);
@@ -297,8 +334,9 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
builder.widget(
new ButtonWidget().setOnClick(
(clickData, widget) -> numbers[index] += clickData.shift ? addNumberShift : addNumber)
- .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18)
- .setPos(xPos, yPos[index]));
+ .setBackground(GT_UITextures.BUTTON_STANDARD, overlay)
+ .setSize(18, 18)
+ .setPos(xPos, yPos[index]));
}
}
@@ -310,7 +348,9 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 96));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(113, 96));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
index d2304cc948..3db3a5eef9 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
@@ -135,8 +135,11 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
final double z = aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D
+ XSTR_INSTANCE.nextFloat() * 14D / 16D;
- new ParticleEventBuilder().setMotion(0D, 0D, 0D).setPosition(x, y, z)
- .setWorld(getBaseMetaTileEntity().getWorld()).setIdentifier(ParticleFX.SMOKE).run();
+ new ParticleEventBuilder().setMotion(0D, 0D, 0D)
+ .setPosition(x, y, z)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .setIdentifier(ParticleFX.SMOKE)
+ .run();
}
}
}
@@ -146,7 +149,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_FRONT),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_FRONT_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -155,7 +161,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BACK),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -163,7 +172,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BOTTOM),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -171,7 +183,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_TOP),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -179,7 +194,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_SIDE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -187,7 +205,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getFrontActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -196,7 +217,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBackActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -204,7 +228,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBottomActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -212,7 +239,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getTopActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -220,7 +250,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getSidesActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
index 90b076abaa..2e0279552a 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
@@ -94,8 +94,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, this.mEfficiency);
+ this.mEfficiency = GregTech_API.sMachineFile.get(
+ ConfigCategories.machineconfig,
+ "GasTurbine.efficiency.tier." + this.mTier,
+ this.mEfficiency);
}
@Override
@@ -108,7 +110,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_FRONT),
- TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_FRONT_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -117,7 +122,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BACK),
- TextureFactory.builder().addIcon(GAS_TURBINE_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -125,7 +133,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BOTTOM),
- TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -133,7 +144,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_TOP),
- TextureFactory.builder().addIcon(GAS_TURBINE_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -141,7 +155,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_SIDE),
- TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -149,7 +166,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getFrontActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -158,7 +178,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBackActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BACK_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -166,7 +189,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBottomActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -174,7 +200,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getTopActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_TOP_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -182,7 +211,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getSidesActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
index 2436beba77..152a849d5a 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
@@ -42,9 +42,13 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
}
if (!aActive) return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS) };
- return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ return new ITexture[] {
+ BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(
+ BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder()
+ .addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -81,8 +85,9 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
int aZ = aBaseMetaTileEntity.getZCoord();
for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) {
- if (isRodValid
- && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) {
+ if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ)
+ .getUnlocalizedName()
+ .equals("blockFenceIron")) {
aRodValue++;
} else {
isRodValid = false;
@@ -94,8 +99,9 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
}
if (!aWorld.isThundering() && ((aY + aRodValue) < 128)) aRodValue = 0;
if (XSTR_INSTANCE.nextInt(4 * aWorld.getHeight()) < (aRodValue * (aY + aRodValue))) {
- aBaseMetaTileEntity
- .increaseStoredEnergyUnits(maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false);
+ aBaseMetaTileEntity.increaseStoredEnergyUnits(
+ maxEUStore() - aBaseMetaTileEntity.getStoredEU(),
+ false);
aWorld.addWeatherEffect(new EntityLightningBolt(aWorld, aX, aY + aRodValue, aZ));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
index 6bc904d384..b67993770d 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
@@ -79,63 +79,93 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
@Override
public ITexture[] getFront(byte aColor) {
return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottom(byte aColor) {
return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTop(byte aColor) {
return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSides(byte aColor) {
return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index d197c264c7..491eeea306 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -119,8 +119,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
// noinspection UnstableApiUsage
sAspectsEnergy.put(
tAspect,
- Enums.getIfPresent(TC_Aspects.class, tAspect.getTag().toUpperCase(Locale.ENGLISH))
- .or(TC_Aspects.AER).mValue * sEnergyPerEssentia);
+ Enums.getIfPresent(
+ TC_Aspects.class,
+ tAspect.getTag()
+ .toUpperCase(Locale.ENGLISH))
+ .or(TC_Aspects.AER).mValue * sEnergyPerEssentia);
}
}
}
@@ -251,20 +254,29 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
@Override
public ITexture[] getFront(byte aColor) {
return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottom(byte aColor) {
return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -275,38 +287,56 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
@Override
public ITexture[] getSides(byte aColor) {
return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG),
- TextureFactory.builder().addIcon(MACHINE_CASING_DRAGONEGG_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_DRAGONEGG_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -373,8 +403,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
final double oY = aBaseMetaTileEntity.getYCoord() + 17D / 32D;
final double oZ = aBaseMetaTileEntity.getZCoord() + 8D / 16D;
- final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder()
- .setWorld(getBaseMetaTileEntity().getWorld()).setIdentifier(ParticleFX.PORTAL);
+ final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder().setWorld(
+ getBaseMetaTileEntity().getWorld())
+ .setIdentifier(
+ ParticleFX.PORTAL);
for (int i = 0; i < 9; i++) {
final double dX = (XSTR_INSTANCE.nextFloat() - 0.5D) / 2D;
@@ -390,7 +422,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
final double mY = -(dXZ * dY) / 4D;
final double mZ = dZ * 4D;
- particleEventBuilder.setMotion(mX, mY, mZ).setPosition(x, y, z).run();
+ particleEventBuilder.setMotion(mX, mY, mZ)
+ .setPosition(x, y, z)
+ .run();
}
}
}
@@ -423,7 +457,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
}
private boolean isDisenchantableItem(ItemStack aStack) {
- return ((aStack.isItemEnchanted()) && (aStack.getItem().getItemEnchantability() > 0));
+ return ((aStack.isItemEnchanted()) && (aStack.getItem()
+ .getItemEnchantability()
+ > 0));
}
private boolean isEnchantedBook(ItemStack aStack) {
@@ -489,7 +525,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if (!sAllowMultipleEggs) {
if (sActiveSiphon != null && sActiveSiphon != this
&& sActiveSiphon.getBaseMetaTileEntity() != null
- && !sActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()
+ && !sActiveSiphon.getBaseMetaTileEntity()
+ .isInvalidTileEntity()
&& sActiveSiphon.isChunkLoaded()
&& sActiveSiphon.hasEgg()) {
getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE);
@@ -500,9 +537,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
Block egg = getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
if (egg == Blocks.dragon_egg) {
return sDragonEggEnergyPerTick;
- } else if (egg.getUnlocalizedName().contains("creeperEgg")) {
- return sCreeperEggEnergyPerTick;
- }
+ } else if (egg.getUnlocalizedName()
+ .contains("creeperEgg")) {
+ return sCreeperEggEnergyPerTick;
+ }
return 0;
}
@@ -569,7 +607,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if (aBlock == Blocks.air) return false;
if (aBlock == Blocks.dragon_egg) return true;
if (aBlock instanceof BlockDragonEgg) return true;
- return (aBlock.getUnlocalizedName().equals("tile.dragonEgg"));
+ return (aBlock.getUnlocalizedName()
+ .equals("tile.dragonEgg"));
}
private boolean isChunkLoaded() {
@@ -678,12 +717,18 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
double tX = tBaseMetaTileEntity.getXCoord();
double tY = tBaseMetaTileEntity.getYCoord();
double tZ = tBaseMetaTileEntity.getZCoord();
- return AxisAlignedBB
- .getBoundingBox(tX - tRange, tY - tRange, tZ - tRange, tX + tRange, tY + tRange, tZ + tRange);
+ return AxisAlignedBB.getBoundingBox(
+ tX - tRange,
+ tY - tRange,
+ tZ - tRange,
+ tX + tRange,
+ tY + tRange,
+ tZ + tRange);
}
private void scanLivingCrystals() {
- World tWorld = mAbsorber.getBaseMetaTileEntity().getWorld();
+ World tWorld = mAbsorber.getBaseMetaTileEntity()
+ .getWorld();
mLivingCrystalIDs.clear();
for (Object o : tWorld.getEntitiesWithinAABB(EntityEnderCrystal.class, getAxisAlignedBB())) {
if (((EntityEnderCrystal) o).isEntityAlive()) {
@@ -698,7 +743,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if (tBaseMetaTileEntity.isInvalidTileEntity()) return;
int tRange = getRange();
int tY = tBaseMetaTileEntity.getYCoord();
- int tMaxY = tBaseMetaTileEntity.getWorld().getHeight() - 1;
+ int tMaxY = tBaseMetaTileEntity.getWorld()
+ .getHeight()
+ - 1;
// Make sure relative Y range stays between 0 and world max Y
int rYMin = (tY - tRange >= 0) ? -tRange : -(tY);
int rYMax = (((tY + tRange) <= tMaxY) ? tRange : tMaxY - tY);
@@ -739,8 +786,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
void update() {
if (mAbsorber == null) return;
if (mAbsorber.getBaseMetaTileEntity() == null) return;
- if (mAbsorber.getBaseMetaTileEntity().isInvalidTileEntity()) return;
- if (mAbsorber.getBaseMetaTileEntity().getWorld() == null) return;
+ if (mAbsorber.getBaseMetaTileEntity()
+ .isInvalidTileEntity())
+ return;
+ if (mAbsorber.getBaseMetaTileEntity()
+ .getWorld()
+ == null)
+ return;
scanLivingCrystals();
scanAvailableAspects();
if (mListener != null) {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
index 5fe5107dc4..615f512ff0 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
@@ -90,8 +90,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
}
public int onConfigLoad() {
- return mEfficiency = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + mTier, getBaseEff());
+ return mEfficiency = GregTech_API.sMachineFile.get(
+ ConfigCategories.machineconfig,
+ "SolidNaquadah.efficiency.tier." + mTier,
+ getBaseEff());
}
@Override
@@ -99,7 +101,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -107,7 +112,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -115,7 +123,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -123,7 +134,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -131,38 +145,56 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] { super.getBottomActive(aColor)[0],
- TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
index 6fbdf73189..6e4bbe2dc7 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
@@ -62,32 +62,47 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
index fc0746f634..6d59c050d0 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
@@ -71,8 +71,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier);
+ this.mEfficiency = GregTech_API.sMachineFile.get(
+ ConfigCategories.machineconfig,
+ "SteamTurbine.efficiency.tier." + this.mTier,
+ 6 + this.mTier);
}
@Override
@@ -96,7 +98,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_FRONT),
- TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_FRONT_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -105,7 +110,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BACK),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -113,7 +121,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BOTTOM),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -121,7 +132,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_TOP),
- TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -129,7 +143,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_SIDE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -137,7 +154,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getFrontActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -146,7 +166,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBackActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BACK_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -154,7 +177,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBottomActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -162,7 +188,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getTopActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_TOP_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -170,7 +199,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getSidesActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
index 4a5cb72be9..bf027be770 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
@@ -33,12 +33,15 @@ public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicH
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- rTextures[0][(i + 1)] = new ITexture[] { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][(i + 1)] = new ITexture[] { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][(i + 1)] = new ITexture[] { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[0][(i + 1)] = new ITexture[] { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZE_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[1][(i + 1)] = new ITexture[] { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZE_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[2][(i + 1)] = new ITexture[] { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZE_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
}
return rTextures;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
index 85e3218f9e..6be36f5798 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
@@ -38,14 +38,17 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks extends GT_MetaTileEntity_
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp0 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp1 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
index 2ec1d32e36..72785918b6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
@@ -32,14 +32,16 @@ public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHu
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp0 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEEL_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
ITexture[] tmp1 = {
TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEEL_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
index e31e793f03..39cd8fec3c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
@@ -38,14 +38,17 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks extends GT_MetaTileEntity_B
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp0 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp1 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEELBRICKS_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java
index d2f116bd1b..6910fd9de5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java
@@ -142,7 +142,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner(
getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
+ .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
}
}
return this.gridProxy;
@@ -331,7 +331,8 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
return null;
}
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
IAEItemStack request = AEItemStack.create(mInventory[aIndex]);
request.setStackSize(Integer.MAX_VALUE);
IAEItemStack result = sg.extractItems(request, Actionable.SIMULATE, getRequestSource());
@@ -375,8 +376,10 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
if (GregTech_API.mAE2) {
AENetworkProxy proxy = getProxy();
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
- Iterator<IAEItemStack> iterator = sg.getStorageList().iterator();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
+ Iterator<IAEItemStack> iterator = sg.getStorageList()
+ .iterator();
int index = 0;
while (iterator.hasNext() && index < SLOT_COUNT) {
IAEItemStack currItem = iterator.next();
@@ -409,14 +412,13 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
if (oldStack == null || oldStack.stackSize < savedStackSizes[i]) {
AENetworkProxy proxy = getProxy();
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
IAEItemStack request = AEItemStack.create(mInventory[i]);
request.setStackSize(savedStackSizes[i] - (oldStack == null ? 0 : oldStack.stackSize));
sg.extractItems(request, Actionable.MODULATE, getRequestSource());
- proxy.getEnergy().extractAEPower(
- request.getStackSize(),
- Actionable.MODULATE,
- PowerMultiplier.CONFIG);
+ proxy.getEnergy()
+ .extractAEPower(request.getStackSize(), Actionable.MODULATE, PowerMultiplier.CONFIG);
setInventorySlotContents(i + SLOT_COUNT, oldStack);
} catch (final GridAccessException ignored) {}
}
@@ -439,7 +441,8 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
return null;
}
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
IAEItemStack request = AEItemStack.create(mInventory[aIndex]);
request.setStackSize(Integer.MAX_VALUE);
IAEItemStack result = sg.extractItems(request, Actionable.SIMULATE, getRequestSource());
@@ -462,61 +465,77 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
final SlotWidget[] aeSlotWidgets = new SlotWidget[16];
buildContext.addSyncedWindow(CONFIG_WINDOW_ID, this::createStackSizeConfigurationWindow);
builder.widget(
- SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15).phantom(true)
- .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME)
- .widgetCreator(slot -> new SlotWidget(slot) {
-
- @Override
- protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
- if (clickData.mouseButton != 0 || autoPullItemList) return;
- final int aSlotIndex = getMcSlot().getSlotIndex();
- if (cursorStack == null) {
- getMcSlot().putStack(null);
- } else {
- if (containsSuchStack(cursorStack)) return;
- getMcSlot().putStack(GT_Utility.copyAmount(1L, cursorStack));
- }
- if (getBaseMetaTileEntity().isServerSide()) {
- final ItemStack newInfo = updateInformationSlot(aSlotIndex, cursorStack);
- aeSlotWidgets[getMcSlot().getSlotIndex()].getMcSlot().putStack(newInfo);
- }
- }
-
- private boolean containsSuchStack(ItemStack tStack) {
- for (int i = 0; i < 16; ++i) {
- if (GT_Utility.areStacksEqual(mInventory[i], tStack, false)) return true;
- }
- return false;
- }
- }).build().setPos(7, 9))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(16).endAtSlot(31).phantom(true)
+ SlotGroup.ofItemHandler(inventoryHandler, 4)
+ .startFromSlot(0)
+ .endAtSlot(15)
+ .phantom(true)
+ .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME)
+ .widgetCreator(slot -> new SlotWidget(slot) {
+
+ @Override
+ protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
+ if (clickData.mouseButton != 0 || autoPullItemList) return;
+ final int aSlotIndex = getMcSlot().getSlotIndex();
+ if (cursorStack == null) {
+ getMcSlot().putStack(null);
+ } else {
+ if (containsSuchStack(cursorStack)) return;
+ getMcSlot().putStack(GT_Utility.copyAmount(1L, cursorStack));
+ }
+ if (getBaseMetaTileEntity().isServerSide()) {
+ final ItemStack newInfo = updateInformationSlot(aSlotIndex, cursorStack);
+ aeSlotWidgets[getMcSlot().getSlotIndex()].getMcSlot()
+ .putStack(newInfo);
+ }
+ }
+
+ private boolean containsSuchStack(ItemStack tStack) {
+ for (int i = 0; i < 16; ++i) {
+ if (GT_Utility.areStacksEqual(mInventory[i], tStack, false)) return true;
+ }
+ return false;
+ }
+ })
+ .build()
+ .setPos(7, 9))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 4)
+ .startFromSlot(16)
+ .endAtSlot(31)
+ .phantom(true)
.background(GT_UITextures.SLOT_DARK_GRAY)
.widgetCreator(
- slot -> aeSlotWidgets[slot.getSlotIndex() - 16] = new AESlotWidget(slot)
- .disableInteraction())
- .build().setPos(97, 9))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_DOUBLE).setPos(82, 40)
- .setSize(12, 12))
- .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) {
- setAutoPullItemList(!autoPullItemList);
- } else if (clickData.mouseButton == 1 && !widget.isClient()) {
- widget.getContext().openSyncedWindow(CONFIG_WINDOW_ID);
- }
- }).setPlayClickSound(true).setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- if (autoPullItemList) ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME);
- else ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED);
- return ret.toArray(new IDrawable[0]);
- }).addTooltips(
- ImmutableList.of(
- "Click to toggle automatic item pulling from ME.",
- "Right-Click to edit minimum stack size for item pulling."))
- .setSize(16, 16).setPos(80, 10))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> autoPullItemList, this::setAutoPullItemList));
+ slot -> aeSlotWidgets[slot.getSlotIndex()
+ - 16] = new AESlotWidget(slot).disableInteraction())
+ .build()
+ .setPos(97, 9))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_DOUBLE)
+ .setPos(82, 40)
+ .setSize(12, 12))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (clickData.mouseButton == 0) {
+ setAutoPullItemList(!autoPullItemList);
+ } else if (clickData.mouseButton == 1 && !widget.isClient()) {
+ widget.getContext()
+ .openSyncedWindow(CONFIG_WINDOW_ID);
+ }
+ })
+ .setPlayClickSound(true)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ if (autoPullItemList) ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME);
+ else ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED);
+ return ret.toArray(new IDrawable[0]);
+ })
+ .addTooltips(
+ ImmutableList.of(
+ "Click to toggle automatic item pulling from ME.",
+ "Right-Click to edit minimum stack size for item pulling."))
+ .setSize(16, 16)
+ .setPos(80, 10))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> autoPullItemList, this::setAutoPullItemList));
}
protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer player) {
@@ -529,22 +548,34 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
builder.setGuiTint(getGUIColorization());
builder.setDraggable(true);
builder.setPos(
- (size, window) -> Alignment.Center.getAlignedPos(size, new Size(PARENT_WIDTH, PARENT_HEIGHT)).add(
- Alignment.TopRight.getAlignedPos(new Size(PARENT_WIDTH, PARENT_HEIGHT), new Size(WIDTH, HEIGHT))
- .add(WIDTH - 3, 0)));
- builder.widget(new TextWidget("Min Stack Size").setPos(3, 2).setSize(74, 14)).widget(
- new TextFieldWidget().setSetterInt(val -> minAutoPullStackSize = val)
- .setGetterInt(() -> minAutoPullStackSize).setNumbers(1, Integer.MAX_VALUE)
- .setOnScrollNumbers(1, 4, 64).setTextAlignment(Alignment.Center)
- .setTextColor(Color.WHITE.normal).setSize(36, 18).setPos(19, 18)
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD));
+ (size, window) -> Alignment.Center.getAlignedPos(size, new Size(PARENT_WIDTH, PARENT_HEIGHT))
+ .add(
+ Alignment.TopRight.getAlignedPos(
+ new Size(PARENT_WIDTH, PARENT_HEIGHT),
+ new Size(WIDTH, HEIGHT))
+ .add(WIDTH - 3, 0)));
+ builder.widget(
+ new TextWidget("Min Stack Size").setPos(3, 2)
+ .setSize(74, 14))
+ .widget(
+ new TextFieldWidget().setSetterInt(val -> minAutoPullStackSize = val)
+ .setGetterInt(() -> minAutoPullStackSize)
+ .setNumbers(1, Integer.MAX_VALUE)
+ .setOnScrollNumbers(1, 4, 64)
+ .setTextAlignment(Alignment.Center)
+ .setTextColor(Color.WHITE.normal)
+ .setSize(36, 18)
+ .setPos(19, 18)
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD));
return builder.build();
}
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(80, 63));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(80, 63));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
index 3e802b6304..70a03a9f03 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
@@ -47,7 +47,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
private BaseActionSource requestSource = null;
private AENetworkProxy gridProxy = null;
- IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance().storage().createItemList() : null;
+ IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance()
+ .storage()
+ .createItemList()
+ : null;
long lastOutputTick = 0;
long tickCounter = 0;
boolean lastOutputFailed = false;
@@ -104,7 +107,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
*/
public int store(final ItemStack stack) {
if (!infiniteCache && lastOutputFailed) return stack.stackSize;
- itemCache.add(AEApi.instance().storage().createItemStack(stack));
+ itemCache.add(
+ AEApi.instance()
+ .storage()
+ .createItemStack(stack));
return 0;
}
@@ -125,10 +131,13 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide).isGUIClickable()) return;
+ if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide)
+ .isGUIClickable())
+ return;
infiniteCache = !infiniteCache;
- GT_Utility
- .sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache));
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache));
}
@Override
@@ -143,7 +152,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner(
getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
+ .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
}
}
return this.gridProxy;
@@ -160,7 +169,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
return;
}
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
for (IAEItemStack s : itemCache) {
if (s.getStackSize() == 0) continue;
IAEItemStack rest = Platform.poweredInsert(proxy.getEnergy(), sg, s, getRequest());
@@ -206,7 +216,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
if (s.getStackSize() == 0) continue;
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound tagItemStack = new NBTTagCompound();
- s.getItemStack().writeToNBT(tagItemStack);
+ s.getItemStack()
+ .writeToNBT(tagItemStack);
tag.setTag("itemStack", tagItemStack);
tag.setLong("size", s.getStackSize());
items.appendTag(tag);
@@ -222,8 +233,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
if (GregTech_API.mAE2) {
NBTBase t = aNBT.getTag("cachedStack"); // legacy
- if (t instanceof NBTTagCompound)
- itemCache.add(AEApi.instance().storage().createItemStack(GT_Utility.loadItem((NBTTagCompound) t)));
+ if (t instanceof NBTTagCompound) itemCache.add(
+ AEApi.instance()
+ .storage()
+ .createItemStack(GT_Utility.loadItem((NBTTagCompound) t)));
t = aNBT.getTag("cachedItems");
if (t instanceof NBTTagList) {
NBTTagList l = (NBTTagList) t;
@@ -231,12 +244,15 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
NBTTagCompound tag = l.getCompoundTagAt(i);
if (!tag.hasKey("itemStack")) { // legacy #868
itemCache.add(
- AEApi.instance().storage().createItemStack(GT_Utility.loadItem(l.getCompoundTagAt(i))));
+ AEApi.instance()
+ .storage()
+ .createItemStack(GT_Utility.loadItem(l.getCompoundTagAt(i))));
continue;
}
NBTTagCompound tagItemStack = tag.getCompoundTag("itemStack");
- final IAEItemStack s = AEApi.instance().storage()
- .createItemStack(GT_Utility.loadItem(tagItemStack));
+ final IAEItemStack s = AEApi.instance()
+ .storage()
+ .createItemStack(GT_Utility.loadItem(tagItemStack));
if (s != null) {
s.setStackSize(tag.getLong("size"));
itemCache.add(s);
@@ -274,7 +290,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
int counter = 0;
for (IAEItemStack s : itemCache) {
ss.add(
- s.getItem().getItemStackDisplayName(s.getItemStack()) + ": "
+ s.getItem()
+ .getItemStackDisplayName(s.getItemStack()) + ": "
+ EnumChatFormatting.GOLD
+ nc.toWideReadableForm(s.getStackSize())
+ EnumChatFormatting.RESET);
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
index 8ae9b395c1..edcbd21b16 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
@@ -51,7 +51,10 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
private BaseActionSource requestSource = null;
private AENetworkProxy gridProxy = null;
- IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance().storage().createFluidList() : null;
+ IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance()
+ .storage()
+ .createFluidList()
+ : null;
long lastOutputTick = 0;
long tickCounter = 0;
boolean lastOutputFailed = false;
@@ -111,7 +114,10 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
*/
public int tryFillAE(final FluidStack aFluid) {
if ((!infiniteCache && lastOutputFailed) || aFluid == null) return 0;
- fluidCache.add(AEApi.instance().storage().createFluidStack(aFluid));
+ fluidCache.add(
+ AEApi.instance()
+ .storage()
+ .createFluidStack(aFluid));
return aFluid.amount;
}
@@ -146,7 +152,9 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
// Don't allow to lock fluid in me fluid hatch
- if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide).isGUIClickable()) return;
+ if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide)
+ .isGUIClickable())
+ return;
infiniteCache = !infiniteCache;
GT_Utility.sendChatToPlayer(
aPlayer,
@@ -165,7 +173,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner(
getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
+ .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
}
}
return this.gridProxy;
@@ -182,7 +190,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
return;
}
try {
- IMEMonitor<IAEFluidStack> sg = proxy.getStorage().getFluidInventory();
+ IMEMonitor<IAEFluidStack> sg = proxy.getStorage()
+ .getFluidInventory();
for (IAEFluidStack s : fluidCache) {
if (s.getStackSize() == 0) continue;
IAEFluidStack rest = fluidAEInsert(proxy.getEnergy(), sg, s, getRequest());
@@ -227,7 +236,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
if (s.getStackSize() == 0) continue;
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound tagFluidStack = new NBTTagCompound();
- s.getFluidStack().writeToNBT(tagFluidStack);
+ s.getFluidStack()
+ .writeToNBT(tagFluidStack);
tag.setTag("fluidStack", tagFluidStack);
tag.setLong("size", s.getStackSize());
fluids.appendTag(tag);
@@ -247,8 +257,9 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
for (int i = 0; i < l.tagCount(); ++i) {
NBTTagCompound tag = l.getCompoundTagAt(i);
NBTTagCompound tagFluidStack = tag.getCompoundTag("fluidStack");
- final IAEFluidStack s = AEApi.instance().storage()
- .createFluidStack(GT_Utility.loadFluid(tagFluidStack));
+ final IAEFluidStack s = AEApi.instance()
+ .storage()
+ .createFluidStack(GT_Utility.loadFluid(tagFluidStack));
if (s != null) {
s.setStackSize(tag.getLong("size"));
fluidCache.add(s);
@@ -286,7 +297,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
int counter = 0;
for (IAEFluidStack s : fluidCache) {
ss.add(
- s.getFluidStack().getLocalizedName() + ": "
+ s.getFluidStack()
+ .getLocalizedName() + ": "
+ EnumChatFormatting.GOLD
+ nc.toWideReadableForm(s.getStackSize())
+ " mB"
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
index 34589d2c1c..ad55276576 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
@@ -56,28 +56,52 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
"", // NEI name
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
radius = aRadius;
step = aStep;
}
@@ -142,10 +166,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
GT_Utility.ItemNBT.setAdvancedProspectionData(
mTier,
aStack,
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId,
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId,
tOils,
GT_Utility.sortByValueToList(tOres),
radius);
@@ -173,9 +201,10 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
for (int i = 0; i < oilfieldSize; i++) {
for (int j = 0; j < oilfieldSize; j++) {
- Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(
- xChunk + i + x * oilfieldSize,
- zChunk + j + z * oilfieldSize);
+ Chunk tChunk = getBaseMetaTileEntity().getWorld()
+ .getChunkFromChunkCoords(
+ xChunk + i + x * oilfieldSize,
+ zChunk + j + z * oilfieldSize);
FluidStack tFluid = undergroundOilReadInformation(tChunk);
if (tFluid != null) {
if (tFluid.amount > max) max = tFluid.amount;
@@ -187,17 +216,28 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
}
}
- aOils.add(++oilFieldCount + "," + min + "-" + max + "," + tFluids.get(cInts).getLocalizedName());
+ aOils.add(
+ ++oilFieldCount + ","
+ + min
+ + "-"
+ + max
+ + ","
+ + tFluids.get(cInts)
+ .getLocalizedName());
}
}
} catch (Exception ignored) {}
}
private void prospectOres(Map<String, Integer> aOres) {
- int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius;
+ int tLeftXBound = this.getBaseMetaTileEntity()
+ .getXCoord()
+ - radius;
int tRightXBound = tLeftXBound + 2 * radius;
- int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius;
+ int tLeftZBound = this.getBaseMetaTileEntity()
+ .getZCoord()
+ - radius;
int tRightZBound = tLeftZBound + 2 * radius;
for (int i = tLeftXBound; i <= tRightXBound; i += step) {
@@ -217,17 +257,20 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
private void prospectHole(int i, int k, Map<String, Integer> aOres) {
String tFoundOre;
- for (int j = this.getBaseMetaTileEntity().getYCoord(); j > 0; j--) {
+ for (int j = this.getBaseMetaTileEntity()
+ .getYCoord(); j > 0; j--) {
tFoundOre = checkForOre(i, j, k);
if (tFoundOre != null) countOre(aOres, tFoundOre, cX, cZ);
}
}
private String checkForOre(int x, int y, int z) {
- Block tBlock = this.getBaseMetaTileEntity().getBlock(x, y, z);
+ Block tBlock = this.getBaseMetaTileEntity()
+ .getBlock(x, y, z);
if (tBlock instanceof GT_Block_Ores_Abstract) {
- TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(x, y, z);
+ TileEntity tTileEntity = getBaseMetaTileEntity().getWorld()
+ .getTileEntity(x, y, z);
if ((tTileEntity instanceof GT_TileEntity_Ores) && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering
// small
@@ -238,10 +281,12 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName;
}
} else {
- int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z);
+ int tMetaID = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(x, y, z);
ItemStack is = new ItemStack(tBlock, 1, tMetaID);
ItemData association = GT_OreDictUnificator.getAssociation(is);
- if ((association != null) && (association.mPrefix.toString().startsWith("ore")))
+ if ((association != null) && (association.mPrefix.toString()
+ .startsWith("ore")))
return association.mMaterial.mMaterial.mDefaultLocalName;
else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
index f94b8404fa..1b30282781 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
@@ -34,28 +34,52 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -203,8 +227,16 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
&& GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) {
return true;
}
- return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler
- .getRecipeOutput(aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack) != null);
+ return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack) != null);
} else {
return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
index 2cab223249..fb0bbfb4c2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
@@ -31,16 +31,16 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine
1,
"E_Oven.png",
"",
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")),
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")),
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM")));
}
@@ -86,7 +86,8 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine
NBTTagCompound aNBT = tStack.getTagCompound();
if (aNBT != null) {
int tHeat = 300;
- long tWorldTime = getBaseMetaTileEntity().getWorld().getTotalWorldTime();
+ long tWorldTime = getBaseMetaTileEntity().getWorld()
+ .getTotalWorldTime();
aNBT = aNBT.getCompoundTag("GT.ToolStats");
if (aNBT != null && aNBT.hasKey("Heat")) {
tHeat = aNBT.getInteger("Heat");
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
index 595953c06f..a0d22efd5d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
@@ -58,28 +58,52 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
// Textures
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -184,7 +208,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
if (GT_Utility.isStackInvalid(is)) return DID_NOT_FIND_RECIPE;
if (is.getItem() instanceof GT_MetaGenerated_Tool || isCircuit(is)
- || blackList.stream().anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true))
+ || blackList.stream()
+ .anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true))
|| compareToUnpacker(is))
return DID_NOT_FIND_RECIPE;
@@ -200,9 +225,10 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
ItemStack in = is.copy();
in.stackSize = 1;
if (stack.isStackEqual(in) && stack.mStackSize <= is.stackSize) {
- return setOutputsAndTime(outputHardOverrides.get(stack).toArray(new ItemStack[0]), stack.mStackSize)
- ? FOUND_AND_SUCCESSFULLY_USED_RECIPE
- : DID_NOT_FIND_RECIPE;
+ return setOutputsAndTime(
+ outputHardOverrides.get(stack)
+ .toArray(new ItemStack[0]),
+ stack.mStackSize) ? FOUND_AND_SUCCESSFULLY_USED_RECIPE : DID_NOT_FIND_RECIPE;
}
}
return null;
@@ -250,8 +276,12 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private int checkRecipeMap() {
- GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes
- .findRecipe(this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs());
+ GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ true,
+ this.maxEUInput(),
+ null,
+ this.getAllInputs());
if (gt_recipe == null) return DID_NOT_FIND_RECIPE;
if (gt_recipe.isRecipeInputEqual(false, null, this.getAllInputs())) {
if (gt_recipe.mSpecialValue == -100) {
@@ -285,17 +315,27 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private static DissassembleReference ensureDowncasting(Collection<? extends DissassembleReference> recipes) {
- ItemStack[] inputs = recipes.stream().findFirst().orElseThrow(NullPointerException::new).inputs;
- int EUt = recipes.stream().findFirst().orElseThrow(NullPointerException::new).EUt;
+ ItemStack[] inputs = recipes.stream()
+ .findFirst()
+ .orElseThrow(NullPointerException::new).inputs;
+ int EUt = recipes.stream()
+ .findFirst()
+ .orElseThrow(NullPointerException::new).EUt;
ItemStack[] output = new ItemStack[inputs.length];
List<GT_Recipe> recipesColl = null;
- if (recipes.size() > 1) recipesColl = recipes.stream().skip(1).map(x -> x.recipe).collect(Collectors.toList());
+ if (recipes.size() > 1) recipesColl = recipes.stream()
+ .skip(1)
+ .map(x -> x.recipe)
+ .collect(Collectors.toList());
handleRecipeTransformation(inputs, output, recipesColl);
return new DissassembleReference(
- recipes.stream().mapToInt(x -> x.stackSize).min().orElseThrow(NumberFormatException::new),
+ recipes.stream()
+ .mapToInt(x -> x.stackSize)
+ .min()
+ .orElseThrow(NumberFormatException::new),
output,
null,
EUt);
@@ -305,8 +345,9 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
List<? extends GT_Recipe> recipesColl) {
for (int i = 0, inputsLength = inputs.length; i < inputsLength; i++) {
Set<ItemStack[]> inputsStacks = null;
- if (recipesColl != null)
- inputsStacks = recipesColl.stream().map(x -> x.mInputs).collect(Collectors.toSet());
+ if (recipesColl != null) inputsStacks = recipesColl.stream()
+ .map(x -> x.mInputs)
+ .collect(Collectors.toSet());
handleRecipeTransformationInternal(inputs, output, inputsStacks, i);
}
addOthersAndHandleAlwaysReplace(inputs, output);
@@ -360,25 +401,29 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
private static ItemStack handleUnification(ItemStack stack) {
for (int oreID : OreDictionary.getOreIDs(stack)) {
- for (int i = 0; i < OreDictionaryOverride[0].length; i++)
- if (OreDictionary.getOreName(oreID).equals(OreDictionaryOverride[0][i])) {
- ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy();
- ret.stackSize = stack.stackSize;
- return ret;
- }
+ for (int i = 0; i < OreDictionaryOverride[0].length; i++) if (OreDictionary.getOreName(oreID)
+ .equals(
+ OreDictionaryOverride[0][i])) {
+ ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy();
+ ret.stackSize = stack.stackSize;
+ return ret;
+ }
}
return GT_OreDictUnificator.get(stack);
}
private static ItemStack handleWildcard(ItemStack stack) {
- if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE && !stack.getItem().isDamageable()) {
+ if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE
+ && !stack.getItem()
+ .isDamageable()) {
stack.setItemDamage(0);
}
return stack;
}
private static ItemStack handleContainerItem(ItemStack stack) {
- if (stack != null && stack.getItem().hasContainerItem(stack)) {
+ if (stack != null && stack.getItem()
+ .hasContainerItem(stack)) {
return null;
}
return stack;
@@ -421,14 +466,20 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private static void handleAnyMaterials(Materials first, AtomicReference<? super Materials> toRpl) {
- if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyIron))) toRpl.set(Materials.Iron);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyCopper)))
+ if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyIron)))
+ toRpl.set(Materials.Iron);
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyCopper)))
toRpl.set(Materials.Copper);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyRubber)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyRubber)))
toRpl.set(Materials.Rubber);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyBronze)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyBronze)))
toRpl.set(Materials.Bronze);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnySyntheticRubber)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnySyntheticRubber)))
toRpl.set(Materials.Rubber);
}
@@ -515,13 +566,31 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
AtomicInteger stacksize = new AtomicInteger();
// Check Recipe Maps for creation of Item
List<DissassembleReference> possibleRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream()
- .filter(x -> Arrays.stream(x.mOutputs).anyMatch(y -> {
- ItemStack out = is.copy();
- out.stackSize = y.stackSize;
- boolean isDone = GT_Utility.areStacksEqual(y, out, true) && y.stackSize <= is.stackSize;
- if (isDone) stacksize.set(y.stackSize);
- return isDone;
- })).map(x -> new DissassembleReference(stacksize.get(), x.mInputs, x)).collect(Collectors.toList());
+ .filter(
+ x -> Arrays.stream(
+ x.mOutputs)
+ .anyMatch(
+ y -> {
+ ItemStack out = is.copy();
+ out.stackSize = y.stackSize;
+ boolean isDone = GT_Utility.areStacksEqual(
+ y,
+ out,
+ true)
+ && y.stackSize
+ <= is.stackSize;
+ if (isDone)
+ stacksize.set(
+ y.stackSize);
+ return isDone;
+ }))
+ .map(
+ x -> new DissassembleReference(
+ stacksize.get(),
+ x.mInputs,
+ x))
+ .collect(
+ Collectors.toList());
// Is there only one way to create it?
if (possibleRecipes.size() == 1) return possibleRecipes;
@@ -529,20 +598,26 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
// There are Multiple Ways -> Get recipe with cheapest inputs
// More Inputs should mean cheaper Materials
return possibleRecipes.stream()
- .sorted(Comparator.comparingDouble(GT_MetaTileEntity_Disassembler::getCheaperInputs))
- .collect(Collectors.toList());
+ .sorted(Comparator.comparingDouble(GT_MetaTileEntity_Disassembler::getCheaperInputs))
+ .collect(Collectors.toList());
}
private static double getCheaperInputs(GT_MetaTileEntity_Disassembler.DissassembleReference x) {
- double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs).flatMapToInt(f -> IntStream.of(f.amount))
- .sum();
+ double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs)
+ .flatMapToInt(f -> IntStream.of(f.amount))
+ .sum();
fluidInputValueRaw = fluidInputValueRaw > 0 ? fluidInputValueRaw : 144D;
- double inputValue = Arrays.stream(x.inputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum()
+ double inputValue = Arrays.stream(x.inputs)
+ .flatMapToInt(f -> IntStream.of(f.stackSize))
+ .sum()
+ (fluidInputValueRaw / 144D);
- double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs).flatMapToInt(f -> IntStream.of(f.amount))
- .sum();
+ double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs)
+ .flatMapToInt(f -> IntStream.of(f.amount))
+ .sum();
fluidOutputValueRaw = fluidOutputValueRaw > 0 ? fluidOutputValueRaw : 144D;
- double outputValue = Arrays.stream(x.recipe.mOutputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum()
+ double outputValue = Arrays.stream(x.recipe.mOutputs)
+ .flatMapToInt(f -> IntStream.of(f.stackSize))
+ .sum()
+ (fluidOutputValueRaw / 144D);
return outputValue / inputValue;
}
@@ -556,7 +631,9 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
ItemStack aStack) {
return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)
&& aStack.getTagCompound() != null
- && aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null;
+ && aStack.getTagCompound()
+ .getCompoundTag("GT.CraftingComponents")
+ != null;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
index d9dc75822d..70b9ecbc22 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
@@ -107,28 +107,52 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -236,8 +260,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
for (int z = 0; z < icycles; z++) {
final IIndividual p = bee.retrievePollen(this);
if (p != null) {
- final ItemStack s = p.getGenome().getSpeciesRoot()
- .getMemberStack(p, EnumGermlingType.POLLEN.ordinal());
+ final ItemStack s = p.getGenome()
+ .getSpeciesRoot()
+ .getMemberStack(p, EnumGermlingType.POLLEN.ordinal());
if (s != null) {
final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s);
pollen.computeIfAbsent(id, k -> {
@@ -264,7 +289,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
final HashMap<GT_Utility.ItemId, Float> drops = new HashMap<>();
final HashMap<GT_Utility.ItemId, ItemStack> dropstacks = new HashMap<>();
- for (Map.Entry<ItemStack, Float> entry : primary.getProductChances().entrySet()) {
+ for (Map.Entry<ItemStack, Float> entry : primary.getProductChances()
+ .entrySet()) {
final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey());
drops.merge(
id,
@@ -273,7 +299,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
Float::sum);
dropstacks.computeIfAbsent(id, k -> entry.getKey());
}
- for (Map.Entry<ItemStack, Float> entry : secondary.getProductChances().entrySet()) {
+ for (Map.Entry<ItemStack, Float> entry : secondary.getProductChances()
+ .entrySet()) {
final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey());
drops.merge(
id,
@@ -284,16 +311,24 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
dropstacks.computeIfAbsent(id, k -> entry.getKey());
}
if (primary.isJubilant(genome, this) && secondary.isJubilant(genome, this))
- for (Map.Entry<ItemStack, Float> entry : primary.getSpecialtyChances().entrySet()) {
- final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey());
- drops.merge(
- id,
- Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f)
- * (float) entry.getKey().stackSize
- * cycles,
- Float::sum);
- dropstacks.computeIfAbsent(id, k -> entry.getKey());
- }
+ for (Map.Entry<ItemStack, Float> entry : primary.getSpecialtyChances()
+ .entrySet()) {
+ final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(
+ entry.getKey());
+ drops.merge(
+ id,
+ Bee.getFinalChance(
+ entry.getValue(),
+ speed,
+ prodMod,
+ 8f)
+ * (float) entry.getKey().stackSize
+ * cycles,
+ Float::sum);
+ dropstacks.computeIfAbsent(
+ id,
+ k -> entry.getKey());
+ }
int i = 0;
final int imax = mOutputItems.length;
@@ -334,11 +369,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
setQueen(null);
for (Map.Entry<GT_Utility.ItemId, Float> entry : drops.entrySet()) {
- final ItemStack s = dropstacks.get(entry.getKey()).copy();
- s.stackSize = entry.getValue().intValue()
- + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue().intValue())
- ? 1
- : 0);
+ final ItemStack s = dropstacks.get(entry.getKey())
+ .copy();
+ s.stackSize = entry.getValue()
+ .intValue()
+ + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue()
+ .intValue()) ? 1 : 0);
if (s.stackSize > 0 && i < imax) while (true) {
if (s.stackSize <= s.getMaxStackSize()) {
this.mOutputItems[i++] = s;
@@ -389,7 +425,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
princess.writeToNBT(nbttagcompound);
this.mOutputItems[0] = new ItemStack(PluginApiculture.items.beeQueenGE);
this.mOutputItems[0].setTagCompound(nbttagcompound);
- beeRoot.getBreedingTracker(getWorld(), getOwner()).registerQueen(princess);
+ beeRoot.getBreedingTracker(getWorld(), getOwner())
+ .registerQueen(princess);
setQueen(null);
getDrone().stackSize -= 1;
@@ -569,8 +606,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
} else
if (i == 0 && j == 0 && beeRoot.isMember(mOutputItems[0], EnumBeeType.QUEEN.ordinal()))
if (aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[0])) break;
- if (aBaseMetaTileEntity
- .addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i]))
+ if (aBaseMetaTileEntity.addStackToSlot(
+ getOutputSlot() + ((j + i) % mOutputItems.length),
+ mOutputItems[i]))
break;
}
Arrays.fill(mOutputItems, null);
@@ -581,8 +619,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
aBaseMetaTileEntity.setActive(false);
if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing) {
- final TileEntity tTileEntity2 = aBaseMetaTileEntity
- .getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing());
+ final TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(
+ aBaseMetaTileEntity.getFrontFacing());
final long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored();
int tMaxStacks = (int) (tStoredEnergy / 64L);
if (tMaxStacks > mOutputItems.length) tMaxStacks = mOutputItems.length;
@@ -609,7 +647,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
}
public void cancelProcess() {
- if (this.getBaseMetaTileEntity().isActive() && this.getBaseMetaTileEntity().isServerSide()
+ if (this.getBaseMetaTileEntity()
+ .isActive()
+ && this.getBaseMetaTileEntity()
+ .isServerSide()
&& usedQueen != null
&& beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) {
Arrays.fill(mOutputItems, null);
@@ -617,9 +658,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
mProgresstime = 0;
mMaxProgresstime = 0;
mStuttering = false;
- this.getBaseMetaTileEntity().setActive(false);
+ this.getBaseMetaTileEntity()
+ .setActive(false);
setQueen(usedQueen);
- this.getBaseMetaTileEntity().disableWorking();
+ this.getBaseMetaTileEntity()
+ .disableWorking();
}
}
@@ -638,9 +681,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
if (s == null) continue;
if (GT_Utility.areStacksEqual(getStackInSlot(i), aStack)) return false;
if (GT_ApiaryUpgrade.isUpgrade(aStack)) {
- if (!GT_ApiaryUpgrade.getUpgrade(aStack).isAllowedToWorkWith(getStackInSlot(i))) return false;
+ if (!GT_ApiaryUpgrade.getUpgrade(aStack)
+ .isAllowedToWorkWith(getStackInSlot(i)))
+ return false;
} else if (GT_ApiaryUpgrade.isUpgrade(s)) {
- if (!GT_ApiaryUpgrade.getUpgrade(s).isAllowedToWorkWith(aStack)) return false;
+ if (!GT_ApiaryUpgrade.getUpgrade(s)
+ .isAllowedToWorkWith(aStack))
+ return false;
}
}
return true;
@@ -687,17 +734,20 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public int getBlockLightValue() {
- return this.getBaseMetaTileEntity().getLightLevelAtSide((byte) 1);
+ return this.getBaseMetaTileEntity()
+ .getLightLevelAtSide((byte) 1);
}
@Override
public boolean canBlockSeeTheSky() {
- return this.getBaseMetaTileEntity().getSkyAtSide((byte) 1);
+ return this.getBaseMetaTileEntity()
+ .getSkyAtSide((byte) 1);
}
@Override
public World getWorld() {
- return this.getBaseMetaTileEntity().getWorld();
+ return this.getBaseMetaTileEntity()
+ .getWorld();
}
GameProfile owner = null;
@@ -705,8 +755,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public GameProfile getOwner() {
if (owner == null) owner = new GameProfile(
- this.getBaseMetaTileEntity().getOwnerUuid(),
- this.getBaseMetaTileEntity().getOwnerName());
+ this.getBaseMetaTileEntity()
+ .getOwnerUuid(),
+ this.getBaseMetaTileEntity()
+ .getOwnerName());
return owner;
}
@@ -720,7 +772,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public BiomeGenBase getBiome() {
- if (biomeOverride == null) return this.getBaseMetaTileEntity().getBiome();
+ if (biomeOverride == null) return this.getBaseMetaTileEntity()
+ .getBiome();
return biomeOverride;
}
@@ -742,7 +795,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public ChunkCoordinates getCoordinates() {
- return this.getBaseMetaTileEntity().getCoords();
+ return this.getBaseMetaTileEntity()
+ .getCoords();
}
// endregion
@@ -823,7 +877,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
private int flowerBlockMeta;
private boolean checkFlower(IBee bee) {
- final String flowerType = bee.getGenome().getFlowerProvider().getFlowerType();
+ final String flowerType = bee.getGenome()
+ .getFlowerProvider()
+ .getFlowerType();
if (!this.flowerType.equals(flowerType)) flowercoords = null;
if (flowercoords != null) {
if (getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlock
@@ -838,8 +894,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
flowercoords = null;
else {
flowerBlock = getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ);
- flowerBlockMeta = getWorld()
- .getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ);
+ flowerBlockMeta = getWorld().getBlockMetadata(
+ flowercoords.posX,
+ flowercoords.posY,
+ flowercoords.posZ);
}
}
if (flowercoords == null) {
@@ -1069,101 +1127,148 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(new ApiarySlot(inventoryHandler, queen))
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_QUEEN)
- .setPos(36, 21))
- .widget(
- new SlotWidget(new ApiarySlot(inventoryHandler, drone))
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_DRONE)
- .setPos(36, 41))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(7).endAtSlot(10)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_BEE_QUEEN)
+ .setPos(36, 21))
+ .widget(
+ new SlotWidget(new ApiarySlot(inventoryHandler, drone)).setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_BEE_DRONE)
+ .setPos(36, 41))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 2)
+ .startFromSlot(7)
+ .endAtSlot(10)
.slotCreator(i -> new ApiarySlot(inventoryHandler, i))
.applyForWidget(
widget -> widget.setGTTooltip(() -> mTooltipCache.getData(UPGRADE_TOOLTIP))
- .setTooltipShowUpDelay(TOOLTIP_DELAY))
- .build().setPos(61, 23));
+ .setTooltipShowUpDelay(TOOLTIP_DELAY))
+ .build()
+ .setPos(61, 23));
super.addUIWidgets(builder, buildContext);
builder.widget(
new ProgressBar().setProgress(() -> (float) getProgresstime() / Math.max(maxProgresstime(), 1))
- .setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20).setPos(70, 3).setSize(20, 18))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> cancelProcess())
- .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setGTTooltip(() -> mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7, 26).setSize(18, 18))
- .widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_INFORMATION).setGTTooltip(() -> {
- final String energyreq = GT_Utility.formatNumbers(
- (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage * getEnergyModifier()
- * getAcceleration()) + getAdditionalEnergyUsage());
- final String Temp = StatCollector.translateToLocal(getTemperature().getName());
- final String Hum = StatCollector.translateToLocal(getHumidity().getName());
- if (getUsedQueen() != null
- && BeeManager.beeRoot.isMember(getUsedQueen(), EnumBeeType.QUEEN.ordinal())) {
- final IBee bee = BeeManager.beeRoot.getMember(getUsedQueen());
- if (bee.isAnalyzed()) {
- final IBeeGenome genome = bee.getGenome();
- final IBeeModifier mod = BeeManager.beeRoot.getBeekeepingMode(getWorld()).getBeeModifier();
- final float tmod = getTerritoryModifier(null, 1f) * mod.getTerritoryModifier(null, 1f);
- final int[] t = Arrays.stream(genome.getTerritory()).map(i -> (int) ((float) i * tmod))
- .toArray();
- return mTooltipCache.getUncachedTooltipData(
- INFO_WITH_BEE_TOOLTIP,
- energyreq,
- Temp,
- Hum,
- genome.getSpeed(),
- getProductionModifier(null, 1f) * mod.getProductionModifier(null, 1f),
- Math.round(
- getFloweringModifier(null, 1f) * genome.getFlowering()
- * mod.getFloweringModifier(null, 1f)),
- Math.round(
- getLifespanModifier(null, null, 1f) * genome.getLifespan()
- * mod.getLifespanModifier(null, null, 1f)),
- t[0],
- t[1],
- t[2]);
- }
- }
- return mTooltipCache.getUncachedTooltipData(INFO_TOOLTIP, energyreq, Temp, Hum);
- }).attachSyncer(
- new FakeSyncWidget.ItemStackSyncer(() -> usedQueen, val -> usedQueen = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange()).setPos(163, 5).setSize(7, 18))
- .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) {
- if (mLockedSpeed) return;
- if (!clickData.shift) {
- mSpeed++;
- if (mSpeed > getMaxSpeed()) mSpeed = 0;
- } else {
- mSpeed--;
- if (mSpeed < 0) mSpeed = getMaxSpeed();
- }
- } else if (clickData.mouseButton == 1) {
- mLockedSpeed = !mLockedSpeed;
- if (mLockedSpeed) mSpeed = getMaxSpeed();
- }
- }).setGTTooltip(
- () -> mTooltipCache.getUncachedTooltipData(
- mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP,
- getAcceleration(),
- GT_Utility.formatNumbers(getAdditionalEnergyUsage())))
- .attachSyncer(
- new FakeSyncWidget.IntegerSyncer(() -> mSpeed, val -> mSpeed = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange())
- .attachSyncer(
- new FakeSyncWidget.BooleanSyncer(() -> mLockedSpeed, val -> mLockedSpeed = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange())
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setBackground(GT_UITextures.PICTURE_SQUARE_LIGHT_GRAY)
- .setPos(25, 62).setSize(18, 18))
- .widget(new TextWidget("x").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(30, 63)).widget(
- TextWidget.dynamicString(() -> String.valueOf(1 << mSpeed))
- // mSpeed is already synced
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(26, 72));
+ .setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20)
+ .setPos(70, 3)
+ .setSize(20, 18))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> cancelProcess())
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_CROSS)
+ .setGTTooltip(() -> mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(7, 26)
+ .setSize(18, 18))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_INFORMATION)
+ .setGTTooltip(() -> {
+ final String energyreq = GT_Utility.formatNumbers(
+ (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage
+ * getEnergyModifier()
+ * getAcceleration()) + getAdditionalEnergyUsage());
+ final String Temp = StatCollector.translateToLocal(
+ getTemperature().getName());
+ final String Hum = StatCollector.translateToLocal(
+ getHumidity().getName());
+ if (getUsedQueen() != null && BeeManager.beeRoot.isMember(
+ getUsedQueen(),
+ EnumBeeType.QUEEN.ordinal())) {
+ final IBee bee = BeeManager.beeRoot.getMember(getUsedQueen());
+ if (bee.isAnalyzed()) {
+ final IBeeGenome genome = bee.getGenome();
+ final IBeeModifier mod = BeeManager.beeRoot.getBeekeepingMode(
+ getWorld())
+ .getBeeModifier();
+ final float tmod = getTerritoryModifier(null, 1f)
+ * mod.getTerritoryModifier(null, 1f);
+ final int[] t = Arrays.stream(genome.getTerritory())
+ .map(i -> (int) ((float) i * tmod))
+ .toArray();
+ return mTooltipCache.getUncachedTooltipData(
+ INFO_WITH_BEE_TOOLTIP,
+ energyreq,
+ Temp,
+ Hum,
+ genome.getSpeed(),
+ getProductionModifier(null, 1f)
+ * mod.getProductionModifier(null, 1f),
+ Math.round(
+ getFloweringModifier(null, 1f)
+ * genome.getFlowering()
+ * mod.getFloweringModifier(null, 1f)),
+ Math.round(
+ getLifespanModifier(null, null, 1f)
+ * genome.getLifespan()
+ * mod.getLifespanModifier(
+ null,
+ null,
+ 1f)),
+ t[0],
+ t[1],
+ t[2]);
+ }
+ }
+ return mTooltipCache.getUncachedTooltipData(
+ INFO_TOOLTIP,
+ energyreq,
+ Temp,
+ Hum);
+ })
+ .attachSyncer(
+ new FakeSyncWidget.ItemStackSyncer(
+ () -> usedQueen,
+ val -> usedQueen = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .setPos(163, 5)
+ .setSize(7, 18))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (clickData.mouseButton == 0) {
+ if (mLockedSpeed) return;
+ if (!clickData.shift) {
+ mSpeed++;
+ if (mSpeed > getMaxSpeed()) mSpeed = 0;
+ } else {
+ mSpeed--;
+ if (mSpeed < 0) mSpeed = getMaxSpeed();
+ }
+ } else if (clickData.mouseButton == 1) {
+ mLockedSpeed = !mLockedSpeed;
+ if (mLockedSpeed) mSpeed = getMaxSpeed();
+ }
+ })
+ .setGTTooltip(
+ () -> mTooltipCache.getUncachedTooltipData(
+ mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP,
+ getAcceleration(),
+ GT_Utility.formatNumbers(getAdditionalEnergyUsage())))
+ .attachSyncer(
+ new FakeSyncWidget.IntegerSyncer(() -> mSpeed, val -> mSpeed = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .attachSyncer(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> mLockedSpeed,
+ val -> mLockedSpeed = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setBackground(GT_UITextures.PICTURE_SQUARE_LIGHT_GRAY)
+ .setPos(25, 62)
+ .setSize(18, 18))
+ .widget(
+ new TextWidget("x").setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(30, 63))
+ .widget(
+ TextWidget.dynamicString(() -> String.valueOf(1 << mSpeed))
+ // mSpeed is already synced
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(26, 72));
}
@Override
@@ -1189,26 +1294,38 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
protected DrawableWidget createErrorStatusArea(ModularWindow.Builder builder, IDrawable picture) {
- return (DrawableWidget) super.createErrorStatusArea(builder, picture).setPos(100, 62).attachSyncer(
- new FakeSyncWidget.ListSyncer<>(() -> Arrays.asList(mErrorStates.toArray(new IErrorState[0])), val -> {
- mErrorStates.clear();
- mErrorStates.addAll(new HashSet<>(val));
- },
- (buffer, val) -> buffer.writeShort(val.getID()),
- buffer -> ForestryAPI.errorStateRegistry.getErrorState(buffer.readShort())),
- builder,
- (widget, val) -> widget.notifyTooltipChange());
+ return (DrawableWidget) super.createErrorStatusArea(builder, picture).setPos(100, 62)
+ .attachSyncer(
+ new FakeSyncWidget.ListSyncer<>(
+ () -> Arrays.asList(
+ mErrorStates.toArray(
+ new IErrorState[0])),
+ val -> {
+ mErrorStates.clear();
+ mErrorStates.addAll(
+ new HashSet<>(
+ val));
+ },
+ (buffer, val) -> buffer.writeShort(
+ val.getID()),
+ buffer -> ForestryAPI.errorStateRegistry.getErrorState(
+ buffer.readShort())),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange());
}
@Override
protected List<String> getErrorDescriptions() {
if (!mErrorStates.isEmpty()) {
- return mErrorStates.stream().map(
- state -> EnumChatFormatting.RED + StatCollector.translateToLocal("for." + state.getDescription()))
- .collect(Collectors.toList());
+ return mErrorStates.stream()
+ .map(
+ state -> EnumChatFormatting.RED
+ + StatCollector.translateToLocal("for." + state.getDescription()))
+ .collect(Collectors.toList());
} else if (mStuttering) {
- return mTooltipCache
- .getData(STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal(POWER_SOURCE_POWER)).text;
+ return mTooltipCache.getData(
+ STALLED_STUTTERING_TOOLTIP,
+ StatCollector.translateToLocal(POWER_SOURCE_POWER)).text;
} else {
return Collections.emptyList();
}
@@ -1251,8 +1368,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
}
}
- private static final UIInfo<?, ?> IndustrialApiaryUI = GT_UIInfos.GTTileEntityUIFactory
- .apply(GT_ModularUIContainer_IndustrialApiary::new);
+ private static final UIInfo<?, ?> IndustrialApiaryUI = GT_UIInfos.GTTileEntityUIFactory.apply(
+ GT_ModularUIContainer_IndustrialApiary::new);
private static class GT_ModularUIContainer_IndustrialApiary extends ModularUIContainer {
@@ -1277,7 +1394,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
if (slotStack == null && !slot.isItemValid(s))
return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer);
if (!GT_ApiaryUpgrade.isUpgrade(s)) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer);
- int max = GT_ApiaryUpgrade.getUpgrade(s).getMaxNumber();
+ int max = GT_ApiaryUpgrade.getUpgrade(s)
+ .getMaxNumber();
if (slotStack != null) max = Math.max(0, max - slotStack.stackSize);
max = Math.min(max, s.stackSize);
if (max == 0) return null;
@@ -1305,7 +1423,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
} else {
if (!GT_Utility.areStacksEqual(aStack, iStack)) continue;
}
- int max = GT_ApiaryUpgrade.getUpgrade(aStack).getMaxNumber();
+ int max = GT_ApiaryUpgrade.getUpgrade(aStack)
+ .getMaxNumber();
if (iStack == null) {
max = Math.min(max, aStack.stackSize);
final ItemStack newstack = aStack.splitStack(max);
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
index d1c03e1527..2c1e46ea9e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
@@ -44,28 +44,52 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_MASSFAB_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MASSFAB_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_TOP_MASSFAB_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_MASSFAB_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW)
+ .glow()
+ .build()));
EUt = V[1] * (long) Math.pow(2, mTier + 2);
}
@@ -105,8 +129,10 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
@Override
public void onConfigLoad(GT_Config aConfig) {
super.onConfigLoad(aConfig);
- sDurationMultiplier = aConfig
- .get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier);
+ sDurationMultiplier = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Massfabricator.UUM_Duration_Multiplier",
+ sDurationMultiplier);
sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM);
sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus);
sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA);
@@ -139,9 +165,9 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
return sRequiresUUA || Arrays.stream(getAllInputs())
- .anyMatch(s -> ItemList.Circuit_Integrated.isStackEqual(s, true, true))
- ? FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS
- : FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ .anyMatch(s -> ItemList.Circuit_Integrated.isStackEqual(s, true, true))
+ ? FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS
+ : FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
return DID_NOT_FIND_RECIPE;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
index 32a0ad8537..b72c456683 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -120,10 +120,15 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
boolean aActive, boolean aRedstone) {
if (aSide == 0) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
if (aActive) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -148,8 +153,10 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
@Override
public void onConfigLoad(GT_Config aConfig) {
- sInterDimensionalTeleportAllowed = aConfig
- .get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true);
+ sInterDimensionalTeleportAllowed = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Teleporter.Interdimensional",
+ true);
mMaxLoss = Math.max(aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLoss", 50), 11);
mMaxLossDistance = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLossDistance", 10000);
mPassiveEnergyUse = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.PassiveEnergy", true);
@@ -241,8 +248,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
}
long energyUse = 10;
if (mMaxLossDistance != 0) {
- energyUse = GT_Utility
- .safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance));
+ energyUse = GT_Utility.safeInt(
+ 10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance));
}
energyUse = packetSize + ((V[mTier] * energyUse) / 100);
if (getBaseMetaTileEntity().isUniversalEnergyStored(energyUse)) {
@@ -408,26 +415,32 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 72).setPos(43, 4))
- .widget(
- TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8))
- .widget(
- TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 16))
- .widget(
- TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 24))
- .widget(
- TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 32))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> hasDimensionalTeleportCapability()).setPos(46, 40))
- .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setSize(90, 72)
+ .setPos(43, 4))
+ .widget(
+ TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 8))
+ .widget(
+ TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 16))
+ .widget(
+ TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 24))
+ .widget(
+ TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 32))
+ .widget(
+ TextWidget.dynamicString(
+ () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setEnabled(widget -> hasDimensionalTeleportCapability())
+ .setPos(46, 40))
+ .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25);
@@ -464,9 +477,11 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer<Integer> setter,
int addNumberShift, int addNumber, int xPos, int yPos) {
builder.widget(
- new ButtonWidget()
- .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
- .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18).setPos(xPos, yPos));
+ new ButtonWidget().setOnClick(
+ (clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
+ .setBackground(GT_UITextures.BUTTON_STANDARD, overlay)
+ .setSize(18, 18)
+ .setPos(xPos, yPos));
}
@Override
@@ -477,6 +492,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 56));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(113, 56));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
index 7e4d5f8165..27dea9bd00 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
@@ -74,48 +74,72 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine
"Miner.png",
"",
TextureFactory.of(
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_SIDE_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_GLOW"))
- .glow().build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_SIDE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_FRONT_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_GLOW"))
- .glow().build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_FRONT_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_TOP_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_GLOW"))
- .glow().build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_TOP_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_BOTTOM_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_GLOW"))
- .glow().build()));
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_BOTTOM_GLOW"))
+ .glow()
+ .build()));
mSpeed = SPEED[aTier];
radiusConfig = RADIUS[mTier];
}
@@ -258,12 +282,17 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine
boolean isOre;
do {
ChunkPosition oreBlockPos = oreBlockPositions.remove(0);
- oreBlock = aBaseMetaTileEntity
- .getBlockOffset(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
+ oreBlock = aBaseMetaTileEntity.getBlockOffset(
+ oreBlockPos.chunkPosX,
+ oreBlockPos.chunkPosY,
+ oreBlockPos.chunkPosZ);
x = aBaseMetaTileEntity.getXCoord() + oreBlockPos.chunkPosX;
y = aBaseMetaTileEntity.getYCoord() + oreBlockPos.chunkPosY;
z = aBaseMetaTileEntity.getZCoord() + oreBlockPos.chunkPosZ;
- isOre = GT_Utility.isOre(oreBlock, aBaseMetaTileEntity.getWorld().getBlockMetadata(x, y, z));
+ isOre = GT_Utility.isOre(
+ oreBlock,
+ aBaseMetaTileEntity.getWorld()
+ .getBlockMetadata(x, y, z));
} // someone else might have removed the block
while (!isOre && !oreBlockPositions.isEmpty());
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
index 054ca1694a..7a786228e4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
@@ -64,10 +64,15 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
boolean aActive, boolean aRedstone) {
if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
if (aActive) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -96,9 +101,14 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
@Override
public void onRemoval() {
- int[] tCoords = { this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId };
+ int[] tCoords = { this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId };
GT_SpawnEventHandler.mobReps.removeIf(coords -> Arrays.equals(coords, tCoords));
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
index f905717c5a..bae01940f9 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
@@ -34,28 +34,52 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_POTIONBREWER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_POTIONBREWER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_POTIONBREWER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_POTIONBREWER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_POTIONBREWER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_POTIONBREWER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -98,7 +122,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi
FluidStack aFluid = getFillableStack();
if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) {
- String tInputName = aFluid.getFluid().getName();
+ String tInputName = aFluid.getFluid()
+ .getName();
if (tInputName.startsWith("potion.")) {
tInputName = tInputName.replaceFirst("potion.", "");
int tFirstDot = tInputName.indexOf('.') + 1;
@@ -194,7 +219,10 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
- return (aFluid.getFluid().getName().startsWith("potion.")) || (super.isFluidInputAllowed(aFluid));
+ return (aFluid.getFluid()
+ .getName()
+ .startsWith("potion."))
+ || (super.isFluidInputAllowed(aFluid));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java
index 7da1ec5e43..71b01f4cc2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java
@@ -41,8 +41,8 @@ public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine {
} else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0)
&& (GT_Utility.isStackInvalid(getSpecialSlot()))
&& (OrePrefixes.block.contains(getInputAt(0)))) {
- ArrayList<ItemStack> tList = GT_OreDictUnificator
- .getOres(GT_OreDictUnificator.getAssociation(getInputAt(0)));
+ ArrayList<ItemStack> tList = GT_OreDictUnificator.getOres(
+ GT_OreDictUnificator.getAssociation(getInputAt(0)));
if (tList.size() > 1) {
tList.add(tList.get(0));
int i = 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index 012f6e547f..db9aedb9eb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -39,8 +39,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0);
private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE);
- private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0));
+ private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(
+ GT_ModHandler.getIC2Item("miningPipeTip", 0));
public static int getMaxDistanceForTier(int aTier) {
return (10 * ((int) Math.pow(1.6D, aTier)));
@@ -366,13 +366,20 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
// 2. once per 5 tick
// 3. can hold retracted pipe in inventory
int tHeadY = getYOfPumpHead();
- if (tHeadY < this.getBaseMetaTileEntity().getYCoord()) {
- final int tXCoord = this.getBaseMetaTileEntity().getXCoord();
- final int tZCoord = this.getBaseMetaTileEntity().getZCoord();
- this.getBaseMetaTileEntity().getWorld().setBlockToAir(tXCoord, tHeadY, tZCoord);
- if (tHeadY < this.getBaseMetaTileEntity().getYCoord() - 1) {
+ if (tHeadY < this.getBaseMetaTileEntity()
+ .getYCoord()) {
+ final int tXCoord = this.getBaseMetaTileEntity()
+ .getXCoord();
+ final int tZCoord = this.getBaseMetaTileEntity()
+ .getZCoord();
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .setBlockToAir(tXCoord, tHeadY, tZCoord);
+ if (tHeadY < this.getBaseMetaTileEntity()
+ .getYCoord()
+ - 1) {
getBaseMetaTileEntity().getWorld()
- .setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK);
+ .setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK);
}
if (this.mInventory[0] == null) {
final ItemStack copy = MINING_PIPE.copy();
@@ -443,7 +450,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord();
if ((!consumeFluid(x, yHead - 1, z)) && (!getBaseMetaTileEntity().getBlock(x, yHead - 1, z)
- .isAir(getBaseMetaTileEntity().getWorld(), x, yHead - 1, z))) {
+ .isAir(
+ getBaseMetaTileEntity().getWorld(),
+ x,
+ yHead - 1,
+ z))) {
// Either we didn't consume a fluid, or it's a non Air block
if (debugBlockPump) {
GT_Log.out.println("PUMP: Did not consume fluid, or non-airblock found");
@@ -466,7 +477,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
}
// And change the previous block to a pipe -- as long as it isn't the pump itself!
if (yHead != getBaseMetaTileEntity().getYCoord()) {
- getBaseMetaTileEntity().getWorld().setBlock(x, yHead, z, MINING_PIPE_BLOCK);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(x, yHead, z, MINING_PIPE_BLOCK);
}
getBaseMetaTileEntity().decrStackSize(0, 1);
if (debugBlockPump) {
@@ -491,7 +503,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
if (nextBlock == MINING_PIPE_BLOCK || nextBlock == MINING_PIPE_TIP_BLOCK) {
// We're running into an existing set of pipes -- Turn this block into a pipe and keep going
this.clearQueue(true);
- getBaseMetaTileEntity().getWorld().setBlock(x, y, z, MINING_PIPE_BLOCK);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(x, y, z, MINING_PIPE_BLOCK);
if (debugBlockPump) {
GT_Log.out.println("PUMP: Hit pipes already in place, trying to merge");
}
@@ -509,7 +522,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
// We're below the pump at the bottom of the pipes, we haven't found a tip; make the previous pipe a
// tip!
this.clearQueue(true);
- getBaseMetaTileEntity().getWorld().setBlock(x, y + 1, z, MINING_PIPE_TIP_BLOCK);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(x, y + 1, z, MINING_PIPE_TIP_BLOCK);
if (debugBlockPump) {
GT_Log.out.println("PUMP: Did not find a tip at bottom, setting last pipe as tip");
}
@@ -652,7 +666,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))) {
if (!isWaterOrLava) {
// Only set Block to Air for non lava/water fluids
- this.getBaseMetaTileEntity().getWorld().setBlockToAir(aX, aY, aZ);
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .setBlockToAir(aX, aY, aZ);
}
this.mFluid.amount += 1000;
@@ -665,7 +681,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
}
getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.getEuUsagePerAction(), true);
- getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, Blocks.air, 0, 2);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(aX, aY, aZ, Blocks.air, 0, 2);
return true;
}
return false;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
index 6add532358..739db376c1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
@@ -52,28 +52,52 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_REPLICATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_REPLICATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_REPLICATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_REPLICATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_REPLICATOR_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_REPLICATOR_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Replicator(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -106,8 +130,9 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine
FluidStack tFluid = getFillableStack();
if ((tFluid != null) && (tFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)))) {
ItemStack tDataOrb = getSpecialSlot();
- if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true))
- && (Behaviour_DataOrb.getDataTitle(tDataOrb).equals("Elemental-Scan"))) {
+ if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true)) && (Behaviour_DataOrb.getDataTitle(tDataOrb)
+ .equals(
+ "Elemental-Scan"))) {
Materials tMaterial = Element.get(Behaviour_DataOrb.getDataName(tDataOrb)).mLinkedMaterials.get(0);
long tMass = cubicFluidMultiplier(MASS_OVERRIDES.getOrDefault(tMaterial, tMaterial.getMass()));
if ((tFluid.amount >= tMass) && (tMass > 0L)) {
@@ -169,9 +194,12 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine
@Override
public int getCapacity() {
if ((sHeaviestElementMass == 0) && (GregTech_API.sPostloadFinished)) {
- sHeaviestElementMass = Materials.getMaterialsMap().values().stream()
- .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())).max()
- .orElseThrow(NoSuchElementException::new);
+ sHeaviestElementMass = Materials.getMaterialsMap()
+ .values()
+ .stream()
+ .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass()))
+ .max()
+ .orElseThrow(NoSuchElementException::new);
// Make the Number nicer =)
sHeaviestElementMass = 1000 * (sHeaviestElementMass / 1000 + 1);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
index 584164fa94..ace1e90f71 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
@@ -32,28 +32,52 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
index 3f37effffa..dc3c4f7dc3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
@@ -50,28 +50,52 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_SCANNER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_SCANNER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_SCANNER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_SCANNER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Scanner(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -221,9 +245,15 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
return 2;
}
- if ((aStack.getItem().getUnlocalizedName().contains("Schematic")
- || aStack.getItem().getUnlocalizedName().contains("schematic"))
- && !aStack.getItem().getUnlocalizedName().contains("Schematics")) {
+ if ((aStack.getItem()
+ .getUnlocalizedName()
+ .contains("Schematic")
+ || aStack.getItem()
+ .getUnlocalizedName()
+ .contains("schematic"))
+ && !aStack.getItem()
+ .getUnlocalizedName()
+ .contains("Schematics")) {
if (mTier < 3) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
String sTier = "";
@@ -232,39 +262,71 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
if (stackItemID == Item.getIdFromItem(
Objects.requireNonNull(
GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 0))
- .getItem())) {
- if (stackItemDamage == 0 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 0))
- .copy().toString()))
+ .getItem())) {
+ if (stackItemDamage == 0 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftCore.modID,
+ "item.schematic",
+ 1L,
+ 0))
+ .copy()
+ .toString()))
sTier = "100";
- else if (stackItemDamage == 1 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 1))
- .copy().toString()))
+ else if (stackItemDamage == 1 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftCore.modID,
+ "item.schematic",
+ 1L,
+ 1))
+ .copy()
+ .toString()))
sTier = "2";
} else {
if (stackItemID == Item.getIdFromItem(
Objects.requireNonNull(
GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 0))
- .getItem())) {
- if (stackItemDamage == 0 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 0))
- .copy().toString()))
+ .getItem())) {
+ if (stackItemDamage == 0 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftMars.modID,
+ "item.schematic",
+ 1L,
+ 0))
+ .copy()
+ .toString()))
sTier = "3";
- else if (stackItemDamage == 1 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 1))
- .copy().toString()))
+ else if (stackItemDamage == 1 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftMars.modID,
+ "item.schematic",
+ 1L,
+ 1))
+ .copy()
+ .toString()))
sTier = "101";
- else if (stackItemDamage == 2 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 2))
- .copy().toString()))
+ else if (stackItemDamage == 2 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftMars.modID,
+ "item.schematic",
+ 1L,
+ 2))
+ .copy()
+ .toString()))
sTier = "102";
- } else if (aStack.getUnlocalizedName().matches(".*\\d+.*"))
- sTier = aStack.getUnlocalizedName().split("(?<=\\D)(?=\\d)")[1].substring(0, 1);
+ } else if (aStack.getUnlocalizedName()
+ .matches(".*\\d+.*"))
+ sTier = aStack.getUnlocalizedName()
+ .split("(?<=\\D)(?=\\d)")[1].substring(0, 1);
else sTier = "1";
}
@@ -287,7 +349,8 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
}
}
if (getSpecialSlot() == null && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) {
- if (GT_Utility.ItemNBT.getBookTitle(aStack).equals("Raw Prospection Data")) {
+ if (GT_Utility.ItemNBT.getBookTitle(aStack)
+ .equals("Raw Prospection Data")) {
GT_Utility.ItemNBT.setBookTitle(aStack, "Analyzed Prospection Data");
GT_Utility.ItemNBT.convertProspectionData(aStack);
aStack.stackSize -= 1;
@@ -336,10 +399,11 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mProgresstime >= (mMaxProgresstime - 1)) {
- if ((this.mOutputItems[0] != null)
- && (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707"))) {
+ if ((this.mOutputItems[0] != null) && (this.mOutputItems[0].getUnlocalizedName()
+ .equals("gt.metaitem.01.32707"))) {
GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ aBaseMetaTileEntity.getWorld()
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"scanning");
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
index 4e8af7d283..18929fcb55 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
@@ -47,28 +47,52 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -104,7 +128,8 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
|| (stackData != null && stackData.mMaterial.mMaterial == Materials.Glyceryl
&& aStack.stackSize >= 1)
|| (aStack.getItem() == ItemList.Block_Powderbarrel.getItem()
- && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1).getItemDamage()
+ && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1)
+ .getItemDamage()
&& aStack.stackSize >= 8))) {
if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) {
if (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)) {
@@ -114,11 +139,12 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
} else if (aStack.getItem() == Ic2Items.dynamite.getItem()) {
aStack.stackSize -= 4;
} else if (aStack.getItem() == ItemList.Block_Powderbarrel.getItem()
- && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1).getItemDamage()) {
- aStack.stackSize -= 8;
- } else {
- aStack.stackSize -= 1;
- }
+ && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1)
+ .getItemDamage()) {
+ aStack.stackSize -= 8;
+ } else {
+ aStack.stackSize -= 1;
+ }
}
this.ready = true;
this.mMaxProgresstime = 200;
@@ -135,15 +161,21 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
int max = range();
int step = step();
- for (int i = this.getBaseMetaTileEntity().getYCoord(); i > 0; i--) {
+ for (int i = this.getBaseMetaTileEntity()
+ .getYCoord(); i > 0; i--) {
for (int f = min; f <= max; f += step) {
for (int g = min; g <= max; g += step) {
- Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g);
+ Block tBlock = this.getBaseMetaTileEntity()
+ .getBlockOffset(f, -i, g);
if ((tBlock instanceof GT_Block_Ores_Abstract)) {
- TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(
- getBaseMetaTileEntity().getXCoord() + f,
- getBaseMetaTileEntity().getYCoord() + (-i),
- getBaseMetaTileEntity().getZCoord() + g);
+ TileEntity tTileEntity = getBaseMetaTileEntity().getWorld()
+ .getTileEntity(
+ getBaseMetaTileEntity().getXCoord()
+ + f,
+ getBaseMetaTileEntity().getYCoord()
+ + (-i),
+ getBaseMetaTileEntity().getZCoord()
+ + g);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
if (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000) {
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData
@@ -156,16 +188,20 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}
}
} else {
- int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(
- getBaseMetaTileEntity().getXCoord() + f,
- getBaseMetaTileEntity().getYCoord() + (-i),
- getBaseMetaTileEntity().getZCoord() + g);
- ItemData tAssotiation = GT_OreDictUnificator
- .getAssociation(new ItemStack(tBlock, 1, tMetaID));
- if ((tAssotiation != null)
- && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- if (!tStringList
- .contains(tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) {
+ int tMetaID = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(
+ getBaseMetaTileEntity().getXCoord()
+ + f,
+ getBaseMetaTileEntity().getYCoord()
+ + (-i),
+ getBaseMetaTileEntity().getZCoord()
+ + g);
+ ItemData tAssotiation = GT_OreDictUnificator.getAssociation(
+ new ItemStack(tBlock, 1, tMetaID));
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString()
+ .startsWith("ore"))) {
+ if (!tStringList.contains(
+ tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) {
tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName);
}
}
@@ -185,10 +221,14 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}
GT_Utility.ItemNBT.setProspectionData(
aPlayer.getCurrentEquippedItem(),
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId,
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId,
tFluid,
tStringArray);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index 2b1f0fa349..210c55578f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -116,9 +116,9 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
int tCount = 64;
for (int i = 0; i < 36; i++) {
if (tPlayer.inventory.getStackInSlot(i) != null) {
- tCount += (tPlayer.inventory.getStackInSlot(i).getMaxStackSize() > 1
- ? tPlayer.inventory.getStackInSlot(i).stackSize
- : 64);
+ tCount += (tPlayer.inventory.getStackInSlot(i)
+ .getMaxStackSize()
+ > 1 ? tPlayer.inventory.getStackInSlot(i).stackSize : 64);
}
}
for (int i = 0; i < 4; i++) {
@@ -128,10 +128,12 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
}
return Math.min(5.0F, tCount / 666.6F);
}
- if (GT_Utility.getClassName(aEntity).equals("EntityItnt")) {
+ if (GT_Utility.getClassName(aEntity)
+ .equals("EntityItnt")) {
return 5.0F;
}
- if (GT_Utility.getClassName(aEntity).equals("EntityNuke")) {
+ if (GT_Utility.getClassName(aEntity)
+ .equals("EntityNuke")) {
return 50.0F;
}
if ((aEntity instanceof EntityArrow)) {
@@ -212,14 +214,23 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) return new ITexture[] {
- MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER_SIDES),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_SIDES_GLOW).glow().build() };
+ if (aSide != this.getBaseMetaTileEntity()
+ .getFrontFacing())
+ return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
+ TextureFactory.of(OVERLAY_TELEPORTER_SIDES), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_SIDES_GLOW)
+ .glow()
+ .build() };
if (aActive) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -244,10 +255,14 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public void onConfigLoad(GT_Config aConfig) {
- sInterDimensionalTeleportAllowed = aConfig
- .get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true);
- sPassiveEnergyDrain = aConfig
- .get(ConfigCategories.machineconfig, "Teleporter.PassiveDrain", sPassiveEnergyDrain);
+ sInterDimensionalTeleportAllowed = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Teleporter.Interdimensional",
+ true);
+ sPassiveEnergyDrain = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Teleporter.PassiveDrain",
+ sPassiveEnergyDrain);
sPowerMultiplyer = aConfig.get(ConfigCategories.machineconfig, "Teleporter.PowerMultipler", sPowerMultiplyer);
sFPowerMultiplyer = sPowerMultiplyer / 100.0;
}
@@ -343,26 +358,36 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
(byte) 64,
(byte) 1);
if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) {
- getBaseMetaTileEntity()
- .decreaseStoredEnergyUnits(
- (long) (Math.pow(tDistance, 1.5) * tDistance
- * (tStacksize
- - (mInventory[0] == null ? 0 : mInventory[0].stackSize))
- * sFPowerMultiplyer),
- false);
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits(
+ (long) (Math.pow(tDistance, 1.5) * tDistance
+ * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize))
+ * sFPowerMultiplyer),
+ false);
}
}
}
- List entities_in_box = getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(
- Entity.class,
- AxisAlignedBB.getBoundingBox(
- getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1,
- getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1,
- getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1,
- getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2,
- getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2,
- getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2)
- + 2));
+ List entities_in_box = getBaseMetaTileEntity().getWorld()
+ .getEntitiesWithinAABB(
+ Entity.class,
+ AxisAlignedBB.getBoundingBox(
+ getBaseMetaTileEntity().getOffsetX(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) - 1,
+ getBaseMetaTileEntity().getOffsetY(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) - 1,
+ getBaseMetaTileEntity().getOffsetZ(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) - 1,
+ getBaseMetaTileEntity().getOffsetX(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) + 2,
+ getBaseMetaTileEntity().getOffsetY(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) + 2,
+ getBaseMetaTileEntity().getOffsetZ(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) + 2));
for (Object tObject : entities_in_box) {
if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) {
@@ -568,26 +593,32 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 72).setPos(43, 4))
- .widget(
- TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8))
- .widget(
- TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 16))
- .widget(
- TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 24))
- .widget(
- TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 32))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> hasDimensionalTeleportCapability()).setPos(46, 40))
- .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setSize(90, 72)
+ .setPos(43, 4))
+ .widget(
+ TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 8))
+ .widget(
+ TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 16))
+ .widget(
+ TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 24))
+ .widget(
+ TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 32))
+ .widget(
+ TextWidget.dynamicString(
+ () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setEnabled(widget -> hasDimensionalTeleportCapability())
+ .setPos(46, 40))
+ .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25);
@@ -624,9 +655,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer<Integer> setter,
int addNumberShift, int addNumber, int xPos, int yPos) {
builder.widget(
- new ButtonWidget()
- .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
- .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18).setPos(xPos, yPos));
+ new ButtonWidget().setOnClick(
+ (clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
+ .setBackground(GT_UITextures.BUTTON_STANDARD, overlay)
+ .setSize(18, 18)
+ .setPos(xPos, yPos));
}
@Override
@@ -637,6 +670,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 56));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(113, 56));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java
index cae467c4a0..7d8ae980cd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java
@@ -136,8 +136,7 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta
TileEntity te = world.getTileEntity(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ);
final IMetaTileEntity tMeta;
if (te instanceof BaseMetaTileEntity
- && ((tMeta = ((BaseMetaTileEntity) te)
- .getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase)
+ && ((tMeta = ((BaseMetaTileEntity) te).getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase)
&& isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) {
// It's the right type!
mTarget = (GT_MetaTileEntity_LongDistancePipelineBase) tMeta;
@@ -241,10 +240,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta
// It's not a block - let's see if it's a tile entity
TileEntity tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ);
if (tTileEntity != gtTile && tTileEntity instanceof BaseMetaTileEntity
- && ((BaseMetaTileEntity) tTileEntity)
- .getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase) {
- final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = (GT_MetaTileEntity_LongDistancePipelineBase) ((BaseMetaTileEntity) tTileEntity)
- .getMetaTileEntity();
+ && ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase) {
+ final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = (GT_MetaTileEntity_LongDistancePipelineBase) ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity();
if (isSameClass(tGtTile) && tWires.contains(
tGtTile.getFacingOffset(
(BaseMetaTileEntity) tTileEntity,
@@ -315,7 +312,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta
IWailaConfigHandler config) {
final NBTTagCompound tag = accessor.getNBTData();
final int facing = getBaseMetaTileEntity().getFrontFacing();
- final int side = (byte) accessor.getSide().ordinal();
+ final int side = (byte) accessor.getSide()
+ .ordinal();
if (side == facing) currentTip.add(GOLD + "Pipeline Input" + RESET);
else if (side == ForgeDirection.OPPOSITES[facing]) currentTip.add(BLUE + "Pipeline Output" + RESET);
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
index ce020560cb..2b4f4fe377 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
@@ -116,7 +116,9 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti
else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] {
MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK) };
else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE),
- TextureFactory.builder().addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE), TextureFactory.builder()
+ .addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
index d62e87c707..85c009b350 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
@@ -195,7 +195,9 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit
else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] {
MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK) };
else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE),
- TextureFactory.builder().addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE), TextureFactory.builder()
+ .addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
index 0b47b93334..54551473f3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
@@ -51,59 +51,176 @@ public class GT_MetaTileEntity_AssemblyLine extends
private static final String STRUCTURE_PIECE_FIRST = "first";
private static final String STRUCTURE_PIECE_LATER = "later";
private static final String STRUCTURE_PIECE_LAST = "last";
- private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_AssemblyLine>builder()
- .addShape(
- STRUCTURE_PIECE_FIRST,
- transpose(
- new String[][] { { " ", "e", " " }, { "~", "l", "G" }, { "g", "m", "g" },
- { "b", "i", "b" }, }))
- .addShape(
- STRUCTURE_PIECE_LATER,
- transpose(
- new String[][] { { " ", "e", " " }, { "d", "l", "d" }, { "g", "m", "g" },
- { "b", "I", "b" }, }))
- .addShape(
- STRUCTURE_PIECE_LAST,
- transpose(
- new String[][] { { " ", "e", " " }, { "d", "l", "d" }, { "g", "m", "g" },
- { "o", "i", "b" }, }))
- .addElement('G', ofBlock(GregTech_API.sBlockCasings3, 10)) // grate machine casing
- .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 9)) // assembler machine casing
- .addElement('m', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casing
- .addElement(
- 'g',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement(
- 'e',
- ofChain(
- Energy.newAny(16, 1, ForgeDirection.UP, ForgeDirection.NORTH, ForgeDirection.SOUTH),
- ofBlock(GregTech_API.sBlockCasings2, 0)))
- .addElement(
- 'd',
- buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class).atLeast(DataHatchElement.DataAccess).dot(2)
- .casingIndex(42).allowOnly(ForgeDirection.NORTH)
- .buildAndChain(GregTech_API.sBlockCasings3, 10))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class)
- .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance).casingIndex(16).dot(3)
- .allowOnly(ForgeDirection.DOWN).buildAndChain(
- ofBlock(GregTech_API.sBlockCasings2, 0),
- ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4)))
- .addElement(
- 'I',
- ofChain(
- // all blocks nearby use solid steel casing, so let's use the texture of that
- InputBus.newAny(16, 5, ForgeDirection.DOWN),
- ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4)))
- .addElement('i', InputBus.newAny(16, 5, ForgeDirection.DOWN))
- .addElement('o', OutputBus.newAny(16, 4, ForgeDirection.DOWN)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_AssemblyLine>builder()
+ .addShape(
+ STRUCTURE_PIECE_FIRST,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "~", "l",
+ "G" },
+ { "g", "m",
+ "g" },
+ { "b", "i",
+ "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LATER,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "d", "l",
+ "d" },
+ { "g", "m",
+ "g" },
+ { "b", "I",
+ "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAST,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "d", "l",
+ "d" },
+ { "g", "m",
+ "g" },
+ { "o", "i",
+ "b" }, }))
+ .addElement(
+ 'G',
+ ofBlock(
+ GregTech_API.sBlockCasings3,
+ 10)) // grate
+ // machine
+ // casing
+ .addElement(
+ 'l',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 9)) // assembler
+ // machine
+ // casing
+ .addElement(
+ 'm',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 5)) // assembling
+ // line
+ // casing
+ .addElement(
+ 'g',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'e',
+ ofChain(
+ Energy.newAny(
+ 16,
+ 1,
+ ForgeDirection.UP,
+ ForgeDirection.NORTH,
+ ForgeDirection.SOUTH),
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 0)))
+ .addElement(
+ 'd',
+ buildHatchAdder(
+ GT_MetaTileEntity_AssemblyLine.class).atLeast(
+ DataHatchElement.DataAccess)
+ .dot(
+ 2)
+ .casingIndex(
+ 42)
+ .allowOnly(
+ ForgeDirection.NORTH)
+ .buildAndChain(
+ GregTech_API.sBlockCasings3,
+ 10))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_AssemblyLine.class).atLeast(
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ Maintenance)
+ .casingIndex(
+ 16)
+ .dot(
+ 3)
+ .allowOnly(
+ ForgeDirection.DOWN)
+ .buildAndChain(
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 0),
+ ofHatchAdder(
+ GT_MetaTileEntity_AssemblyLine::addOutputToMachineList,
+ 16,
+ 4)))
+ .addElement(
+ 'I',
+ ofChain(
+ // all
+ // blocks
+ // nearby
+ // use
+ // solid
+ // steel
+ // casing,
+ // so
+ // let's
+ // use
+ // the
+ // texture
+ // of
+ // that
+ InputBus.newAny(
+ 16,
+ 5,
+ ForgeDirection.DOWN),
+ ofHatchAdder(
+ GT_MetaTileEntity_AssemblyLine::addOutputToMachineList,
+ 16,
+ 4)))
+ .addElement(
+ 'i',
+ InputBus.newAny(
+ 16,
+ 5,
+ ForgeDirection.DOWN))
+ .addElement(
+ 'o',
+ OutputBus.newAny(
+ 16,
+ 4,
+ ForgeDirection.DOWN))
+ .build();
public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -121,23 +238,28 @@ public class GT_MetaTileEntity_AssemblyLine extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Assembling Line").addInfo("Controller block for the Assembling Line")
- .addInfo("Used to make complex machine parts (LuV+)").addInfo("Does not make Assembler items")
- .addSeparator().beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false) // ?
- .addStructureInfo("From Bottom to Top, Left to Right")
- .addStructureInfo(
- "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing")
- .addStructureInfo(
- "Layer 2 - Borosilicate Glass(any)/Warded Glass/Reinforced Glass, Assembling Line Casing, Reinforced Glass")
- .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing")
- .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty")
- .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes")
- .addController("Either Grate on layer 3 of the first slice").addEnergyHatch("Any layer 4 casing", 1)
- .addMaintenanceHatch("Any layer 1 casing", 3).addInputBus("As specified on layer 1", 4, 5)
- .addInputHatch("Any layer 1 casing", 3)
- .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4)
- .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Assembling Line")
+ .addInfo("Controller block for the Assembling Line")
+ .addInfo("Used to make complex machine parts (LuV+)")
+ .addInfo("Does not make Assembler items")
+ .addSeparator()
+ .beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false) // ?
+ .addStructureInfo("From Bottom to Top, Left to Right")
+ .addStructureInfo(
+ "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing")
+ .addStructureInfo(
+ "Layer 2 - Borosilicate Glass(any)/Warded Glass/Reinforced Glass, Assembling Line Casing, Reinforced Glass")
+ .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing")
+ .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty")
+ .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes")
+ .addController("Either Grate on layer 3 of the first slice")
+ .addEnergyHatch("Any layer 4 casing", 1)
+ .addMaintenanceHatch("Any layer 1 casing", 3)
+ .addInputBus("As specified on layer 1", 4, 5)
+ .addInputHatch("Any layer 1 casing", 3)
+ .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4)
+ .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -145,13 +267,26 @@ public class GT_MetaTileEntity_AssemblyLine extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] };
}
@@ -185,8 +320,9 @@ public class GT_MetaTileEntity_AssemblyLine extends
boolean foundRecipe = false;
nextDataStick: for (ItemStack tDataStick : tDataStickList) {
- GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils
- .findAssemblyLineRecipeFromDataStick(tDataStick, false);
+ GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils.findAssemblyLineRecipeFromDataStick(
+ tDataStick,
+ false);
if (tLookupResult.getType() == GT_AssemblyLineUtils.LookupResultType.INVALID_STICK) continue;
@@ -244,8 +380,8 @@ public class GT_MetaTileEntity_AssemblyLine extends
continue nextDataStick;
} else {
if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) {
- GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches
- .get(i);
+ GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(
+ i);
if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i])
|| tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i])
< tRecipe.mFluidInputs[i].amount) {
@@ -295,14 +431,15 @@ public class GT_MetaTileEntity_AssemblyLine extends
GT_FML_LOGGER.info("All checked start consuming inputs");
}
for (int i = 0; i < tStack.length; i++) {
- ItemStack stackInSlot = mInputBusses.get(i).getStackInSlot(0);
+ ItemStack stackInSlot = mInputBusses.get(i)
+ .getStackInSlot(0);
stackInSlot.stackSize -= tStack[i];
}
for (int i = 0; i < tFluids.length; i++) {
if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) {
- GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches
- .get(i);
+ GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(
+ i);
tMultiHatch.getFluid(tFluidSlot[i]).amount -= tFluids[i];
if (tMultiHatch.getFluid(tFluidSlot[i]).amount <= 0) {
tMultiHatch.setFluid(null, tFluidSlot[i]);
@@ -398,10 +535,18 @@ public class GT_MetaTileEntity_AssemblyLine extends
}
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i)
+ != null
+ && isCorrectDataItem(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i),
+ state))
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
index 5babf4405d..96b4c19b93 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
@@ -23,9 +23,12 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
private static final ITexture[] FACING_SIDE = { TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS) };
private static final ITexture[] FACING_FRONT = {
TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE) };
- private static final ITexture[] FACING_ACTIVE = {
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE), TextureFactory.builder()
- .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW).glow().build() };
+ private static final ITexture[] FACING_ACTIVE = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
private GT_Multiblock_Tooltip_Builder tooltipBuilder;
public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) {
@@ -57,15 +60,19 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
protected GT_Multiblock_Tooltip_Builder getTooltip() {
if (tooltipBuilder == null) {
tooltipBuilder = new GT_Multiblock_Tooltip_Builder();
- tooltipBuilder.addMachineType("Blast Furnace").addInfo("Controller Block for the Bricked Blast Furnace")
- .addInfo("Usable for Steel and general Pyrometallurgy")
- .addInfo("Has a useful interface, unlike other gregtech multis")
- .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond).addSeparator()
- .beginStructureBlock(3, 4, 3, true).addController("Front center")
- .addOtherStructurePart("Firebricks", "Everything except the controller")
- .addStructureInfo("The top block is also empty")
- .addStructureInfo("You can share the walls of GT multis, so")
- .addStructureInfo("each additional one costs less, up to 4").toolTipFinisher("Gregtech");
+ tooltipBuilder.addMachineType("Blast Furnace")
+ .addInfo("Controller Block for the Bricked Blast Furnace")
+ .addInfo("Usable for Steel and general Pyrometallurgy")
+ .addInfo("Has a useful interface, unlike other gregtech multis")
+ .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond)
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, true)
+ .addController("Front center")
+ .addOtherStructurePart("Firebricks", "Everything except the controller")
+ .addStructureInfo("The top block is also empty")
+ .addStructureInfo("You can share the walls of GT multis, so")
+ .addStructureInfo("each additional one costs less, up to 4")
+ .toolTipFinisher("Gregtech");
}
return tooltipBuilder;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
index 8c22ab780f..1710b33513 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
@@ -20,7 +20,10 @@ public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_Prim
private static final ITexture[] FACING_SIDE = { TextureFactory.of(MACHINE_BRONZEPLATEDBRICKS) };
private static final ITexture[] FACING_FRONT = { TextureFactory.of(MACHINE_BRONZEBLASTFURNACE) };
private static final ITexture[] FACING_ACTIVE = { TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
index 4f1aec7f4a..8780bdb038 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
@@ -112,13 +112,14 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if (isWoodLog(
getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ),
getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ)))
- getBaseMetaTileEntity().getWorld().setBlock(
- getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX,
- getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY,
- getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ,
- GregTech_API.sBlockReinforced,
- 4,
- 3);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(
+ getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX,
+ getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY,
+ getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ,
+ GregTech_API.sBlockReinforced,
+ 4,
+ 3);
}
running = false;
return false;
@@ -131,7 +132,9 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
private boolean isWoodLog(Block log, int meta) {
for (int id : OreDictionary.getOreIDs(new ItemStack(log, 1, meta))) {
- if (OreDictionary.getOreName(id).equals("logWood")) return true;
+ if (OreDictionary.getOreName(id)
+ .equals("logWood"))
+ return true;
}
String tTool = log.getHarvestTool(meta);
return OrePrefixes.log.contains(new ItemStack(log, 1, meta)) && ("axe".equals(tTool))
@@ -254,15 +257,19 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Charcoal Pile Igniter").addInfo("Controller for the Charcoal Pit")
- .addInfo("Converts Logs into Brittle Charcoal blocks").addInfo("Will automatically start when valid")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator()
- .beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false)
- .addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter")
- .addOtherStructurePart("Bricks", "Bottom layer, under all wood logs")
- .addOtherStructurePart("Dirt/Grass", "All logs must be covered by these, the controller, or bricks")
- .addOtherStructurePart("Wood Logs", "Inside the previously mentioned blocks")
- .addStructureInfo("No air between logs allowed").toolTipFinisher("Gregtech");
+ tt.addMachineType("Charcoal Pile Igniter")
+ .addInfo("Controller for the Charcoal Pit")
+ .addInfo("Converts Logs into Brittle Charcoal blocks")
+ .addInfo("Will automatically start when valid")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false)
+ .addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter")
+ .addOtherStructurePart("Bricks", "Bottom layer, under all wood logs")
+ .addOtherStructurePart("Dirt/Grass", "All logs must be covered by these, the controller, or bricks")
+ .addOtherStructurePart("Wood Logs", "Inside the previously mentioned blocks")
+ .addStructureInfo("No air between logs allowed")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -272,9 +279,15 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if (aSide == 1) {
if (aActive)
return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build(), };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build(), };
}
return new ITexture[] { casingTexturePages[0][10] };
}
@@ -292,12 +305,15 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, 0.3D, 0D)
- .setIdentifier(ParticleFX.LARGE_SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getOffsetX((byte) 1, 1) + XSTR_INSTANCE.nextFloat(),
- aBaseMetaTileEntity.getOffsetY((byte) 1, 1),
- aBaseMetaTileEntity.getOffsetZ((byte) 1, 1) + XSTR_INSTANCE.nextFloat())
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.LARGE_SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getOffsetX((byte) 1, 1)
+ + XSTR_INSTANCE.nextFloat(),
+ aBaseMetaTileEntity.getOffsetY((byte) 1, 1),
+ aBaseMetaTileEntity.getOffsetZ((byte) 1, 1)
+ + XSTR_INSTANCE.nextFloat())
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
index fd724c57ea..0d18ce040b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
@@ -53,25 +53,30 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Cleanroom").addInfo("Controller block for the Cleanroom")
- .addInfo("Consumes 40 EU/t when first turned on")
- .addInfo("and 4 EU/t once at 100% efficiency when not overclocked") // ?
- .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV")
- .addInfo("2 LV batteries + 1 LV generator or 1 MV generator") // ?
- .addInfo("Time required to reach full efficiency is proportional to")
- .addInfo("the height of empty space within").addInfo("Make sure your Energy Hatch matches! ?")
- .addInfo("Machines that cause pollution aren't allowed to be put in.").addSeparator()
- .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true).addController("Top center")
- .addCasingInfoRange("Plascrete", 20, 1007, false)
- .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check
- .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check
- .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
- .addEnergyHatch("Any casing. Exactly one.") // check
- .addMaintenanceHatch("Any casing")
- .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)")
- .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls")
- .addStructureInfo("You can also use Diodes for more power")
- .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit").toolTipFinisher("Gregtech");
+ tt.addMachineType("Cleanroom")
+ .addInfo("Controller block for the Cleanroom")
+ .addInfo("Consumes 40 EU/t when first turned on")
+ .addInfo("and 4 EU/t once at 100% efficiency when not overclocked") // ?
+ .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV")
+ .addInfo("2 LV batteries + 1 LV generator or 1 MV generator") // ?
+ .addInfo("Time required to reach full efficiency is proportional to")
+ .addInfo("the height of empty space within")
+ .addInfo("Make sure your Energy Hatch matches! ?")
+ .addInfo("Machines that cause pollution aren't allowed to be put in.")
+ .addSeparator()
+ .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true)
+ .addController("Top center")
+ .addCasingInfoRange("Plascrete", 20, 1007, false)
+ .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check
+ .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check
+ .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
+ .addEnergyHatch("Any casing. Exactly one.") // check
+ .addMaintenanceHatch("Any casing")
+ .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)")
+ .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls")
+ .addStructureInfo("You can also use Diodes for more power")
+ .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -193,8 +198,10 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
} else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
mPlascreteCount++;
} else {
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
- .getIGregTechTileEntityOffset(dX, dY, dZ);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ dX,
+ dY,
+ dZ);
if ((!this.addMaintenanceToMachineList(tTileEntity, 210))
&& (!this.addEnergyInputToMachineList(tTileEntity, 210))) {
if (tBlock instanceof ic2.core.block.BlockIC2Door) {
@@ -318,13 +325,19 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == ForgeDirection.DOWN.ordinal() || aSide == ForgeDirection.UP.ordinal()) {
- return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE),
- aActive ? TextureFactory.of(
+ return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE), aActive
+ ? TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_CLEANROOM_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW).glow().build())
- : TextureFactory.of(
- TextureFactory.of(OVERLAY_TOP_CLEANROOM),
- TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW)
+ .glow()
+ .build())
+ : TextureFactory.of(
+ TextureFactory.of(OVERLAY_TOP_CLEANROOM),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_CLEANROOM_GLOW)
+ .glow()
+ .build()) };
}
return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE) };
}
@@ -412,18 +425,46 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
public static void loadConfig(Configuration cfg) {
if (!cfg.hasCategory(category)) setDefaultConfigValues(cfg);
- for (ConfigCategory cc : cfg.getCategory(category).getChildren()) {
- final String name = cc.get("Name").getString();
+ for (ConfigCategory cc : cfg.getCategory(category)
+ .getChildren()) {
+ final String name = cc.get("Name")
+ .getString();
if (cc.containsKey("Count")) {
if (cc.containsKey("Meta")) config.put(
- name + ":" + cc.get("Meta").getInt(),
- new ConfigEntry(0, cc.get("Count").getInt(), cc.get("Meta").getInt()));
- else config.put(name, new ConfigEntry(0, cc.get("Count").getInt(), wildcard_meta));
+ name + ":"
+ + cc.get("Meta")
+ .getInt(),
+ new ConfigEntry(
+ 0,
+ cc.get("Count")
+ .getInt(),
+ cc.get("Meta")
+ .getInt()));
+ else config.put(
+ name,
+ new ConfigEntry(
+ 0,
+ cc.get("Count")
+ .getInt(),
+ wildcard_meta));
} else if (cc.containsKey("Percentage")) {
if (cc.containsKey("Meta")) config.put(
- name + ":" + cc.get("Meta").getInt(),
- new ConfigEntry(cc.get("Percentage").getInt(), 0, cc.get("Meta").getInt()));
- else config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0, wildcard_meta));
+ name + ":"
+ + cc.get("Meta")
+ .getInt(),
+ new ConfigEntry(
+ cc.get("Percentage")
+ .getInt(),
+ 0,
+ cc.get("Meta")
+ .getInt()));
+ else config.put(
+ name,
+ new ConfigEntry(
+ cc.get("Percentage")
+ .getInt(),
+ 0,
+ wildcard_meta));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
index dd2f54455a..2b902349bc 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
@@ -29,21 +29,28 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
}
protected GT_Multiblock_Tooltip_Builder createTooltip(String aStructureName) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Concrete Backfiller").addInfo("Controller Block for the " + aStructureName)
- .addInfo("Will fill in areas below it with light concrete. This goes through walls")
- .addInfo("Use it to remove any spawning locations beneath your base to reduce lag")
- .addInfo("Will pull back the pipes after it finishes that layer")
- .addInfo("Radius is " + getRadius() + " blocks").addSeparator().beginStructureBlock(3, 7, 3, false)
- .addController("Front bottom").addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes, optional, any base casing", 1)
- .addInputHatch("GT Concrete, any base casing", 1)
- .addOutputBus("Mining Pipes, optional, any base casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Concrete Backfiller")
+ .addInfo("Controller Block for the " + aStructureName)
+ .addInfo("Will fill in areas below it with light concrete. This goes through walls")
+ .addInfo("Use it to remove any spawning locations beneath your base to reduce lag")
+ .addInfo("Will pull back the pipes after it finishes that layer")
+ .addInfo("Radius is " + getRadius() + " blocks")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes, optional, any base casing", 1)
+ .addInputHatch("GT Concrete, any base casing", 1)
+ .addOutputBus("Mining Pipes, optional, any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -103,18 +110,28 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
private boolean isRefillableBlock(int aX, int aY, int aZ) {
IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
- if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ)
- || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid())
+ if (!aBaseTile.getBlock(aX, aY, aZ)
+ .isAir(aBaseTile.getWorld(), aX, aY, aZ)
+ || aBaseTile.getBlock(aX, aY, aZ)
+ .getMaterial()
+ .isSolid())
return false;
- if (!GT_Utility
- .setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true))
+ if (!GT_Utility.setBlockByFakePlayer(
+ getFakePlayer(aBaseTile),
+ aX,
+ aY,
+ aZ,
+ GregTech_API.sBlockConcretes,
+ 8,
+ true))
return false;
return true;
}
private boolean tryRefillBlock(int aX, int aY, int aZ) {
if (!tryConsumeFluid()) return false;
- getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
return true;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
index 381df634d2..f445d5fea1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
@@ -50,23 +50,34 @@ public class GT_MetaTileEntity_DieselEngine extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_DieselEngine> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "---", "iii", "chc", "chc", "ccc", },
- { "---", "i~i", "hgh", "hgh", "cdc", }, { "---", "iii", "chc", "chc", "ccc", }, }))
- .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta())))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta())))
- .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2)))
- .addElement(
- 'h',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_DieselEngine.class)
- .atLeast(InputHatch, InputHatch, InputHatch, Muffler, Maintenance)
- .casingIndex(t.getCasingTextureIndex()).dot(1)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "---", "iii", "chc", "chc", "ccc", },
+ { "---", "i~i", "hgh", "hgh", "cdc", },
+ { "---", "iii", "chc", "chc", "ccc", }, }))
+ .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta())))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta())))
+ .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2)))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_DieselEngine.class).atLeast(
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ Muffler,
+ Maintenance)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(1)
+ .buildAndChain(
+ t.getCasingBlock(),
+ t.getCasingMeta())))
+ .build();
}
};
protected int fuelConsumption = 0;
@@ -85,21 +96,28 @@ public class GT_MetaTileEntity_DieselEngine extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Combustion Generator").addInfo("Controller block for the Large Combustion Engine")
- .addInfo("Supply Diesel Fuels and 1000L of Lubricant per hour to run")
- .addInfo("Supply 40L/s of Oxygen to boost output (optional)")
- .addInfo("Default: Produces 2048EU/t at 100% fuel efficiency")
- .addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency")
- .addInfo("You need to wait for it to reach 300% to output full power")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
- .addController("Front center").addCasingInfoRange("Stable Titanium Machine Casing", 16, 22, false)
- .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
- .addOtherStructurePart("Engine Intake Machine Casing", "8x, ring around controller")
- .addStructureInfo("Engine Intake Casings must not be obstructed in front (only air blocks)")
- .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1)
- .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
- .addInputHatch("Diesel Fuel, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1)
- .addInputHatch("Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Combustion Generator")
+ .addInfo("Controller block for the Large Combustion Engine")
+ .addInfo("Supply Diesel Fuels and 1000L of Lubricant per hour to run")
+ .addInfo("Supply 40L/s of Oxygen to boost output (optional)")
+ .addInfo("Default: Produces 2048EU/t at 100% fuel efficiency")
+ .addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency")
+ .addInfo("You need to wait for it to reach 300% to output full power")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfoRange("Stable Titanium Machine Casing", 16, 22, false)
+ .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
+ .addOtherStructurePart("Engine Intake Machine Casing", "8x, ring around controller")
+ .addStructureInfo("Engine Intake Casings must not be obstructed in front (only air blocks)")
+ .addDynamoHatch("Back center", 2)
+ .addMaintenanceHatch("One of the casings next to a Gear Box", 1)
+ .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
+ .addInputHatch("Diesel Fuel, next to a Gear Box", 1)
+ .addInputHatch("Lubricant, next to a Gear Box", 1)
+ .addInputHatch("Oxygen, optional, next to a Gear Box", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -107,13 +125,25 @@ public class GT_MetaTileEntity_DieselEngine extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][50],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][50],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][50], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][50], TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][50] };
}
@@ -318,8 +348,10 @@ public class GT_MetaTileEntity_DieselEngine extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index 7302625406..eb5adfbd3c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -53,65 +53,104 @@ public class GT_MetaTileEntity_DistillationTower
private static final IStructureDefinition<GT_MetaTileEntity_DistillationTower> STRUCTURE_DEFINITION;
static {
- IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch
- .withCount(GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount)
- .withAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch);
+ IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch.withCount(
+ GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount)
+ .withAdder(
+ GT_MetaTileEntity_DistillationTower::addLayerOutputHatch);
STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_DistillationTower>builder()
- .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { { "b~b", "bbb", "bbb" }, }))
- .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] { { "lll", "lcl", "lll" }, }))
- .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] { { "lll", "l-l", "lll" }, }))
- .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] { { "LLL", "LLL", "LLL" }, }))
- .addElement(
- 'b',
- ofChain(
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class)
- .atLeast(Energy, OutputBus, InputHatch, InputBus, Maintenance)
- .casingIndex(CASING_INDEX).dot(1).build(),
- onElementPass(
- GT_MetaTileEntity_DistillationTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'l',
- ofChain(
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch)
- .casingIndex(CASING_INDEX).dot(2)
- .disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN).build(),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList,
- CASING_INDEX,
- 2),
- ofHatchAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch, CASING_INDEX, 2),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
- CASING_INDEX,
- 2),
- onElementPass(
- GT_MetaTileEntity_DistillationTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- // hint element only used in top layer
- .addElement(
- 'L',
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch)
- .casingIndex(CASING_INDEX).dot(2).disallowOnly(ForgeDirection.UP)
- .buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'c',
- ofChain(
- onElementPass(
- t -> t.onTopLayerFound(false),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addOutputToMachineList,
- CASING_INDEX,
- 3)),
- onElementPass(
- t -> t.onTopLayerFound(false),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
- CASING_INDEX,
- 3)),
- onElementPass(t -> t.onTopLayerFound(true), ofBlock(GregTech_API.sBlockCasings4, 1)),
- isAir()))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_BASE,
+ transpose(new String[][] { { "b~b", "bbb", "bbb" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAYER,
+ transpose(new String[][] { { "lll", "lcl", "lll" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAYER_HINT,
+ transpose(new String[][] { { "lll", "l-l", "lll" }, }))
+ .addShape(
+ STRUCTURE_PIECE_TOP_HINT,
+ transpose(new String[][] { { "LLL", "LLL", "LLL" }, }))
+ .addElement(
+ 'b',
+ ofChain(
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ Energy,
+ OutputBus,
+ InputHatch,
+ InputBus,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .build(),
+ onElementPass(
+ GT_MetaTileEntity_DistillationTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
+ .addElement(
+ 'l',
+ ofChain(
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ layeredOutputHatch)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 2)
+ .disallowOnly(
+ ForgeDirection.UP,
+ ForgeDirection.DOWN)
+ .build(),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList,
+ CASING_INDEX,
+ 2),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addLayerOutputHatch,
+ CASING_INDEX,
+ 2),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 2),
+ onElementPass(
+ GT_MetaTileEntity_DistillationTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
+ // hint element only used in top layer
+ .addElement(
+ 'L',
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ layeredOutputHatch)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(2)
+ .disallowOnly(
+ ForgeDirection.UP)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'c',
+ ofChain(
+ onElementPass(
+ t -> t.onTopLayerFound(false),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addOutputToMachineList,
+ CASING_INDEX,
+ 3)),
+ onElementPass(
+ t -> t.onTopLayerFound(false),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 3)),
+ onElementPass(
+ t -> t.onTopLayerFound(true),
+ ofBlock(GregTech_API.sBlockCasings4, 1)),
+ isAir()))
+ .build();
}
protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>();
@@ -135,15 +174,20 @@ public class GT_MetaTileEntity_DistillationTower
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Distillery").addInfo("Controller block for the Distillation Tower")
- .addInfo("Fluids are only put out at the correct height")
- .addInfo("The correct height equals the slot number in the NEI recipe").addSeparator()
- .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true).addController("Front bottom")
- .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)")
- .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2, 3)
- .addInputHatch("Any bottom layer casing", 1).addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Distillery")
+ .addInfo("Controller block for the Distillation Tower")
+ .addInfo("Fluids are only put out at the correct height")
+ .addInfo("The correct height equals the slot number in the NEI recipe")
+ .addSeparator()
+ .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true)
+ .addController("Front bottom")
+ .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)")
+ .addEnergyHatch("Any casing", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("Any bottom layer casing", 1)
+ .addOutputBus("Any bottom layer casing", 1)
+ .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -152,13 +196,25 @@ public class GT_MetaTileEntity_DistillationTower
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_DISTILLATION_TOWER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@@ -254,7 +310,8 @@ public class GT_MetaTileEntity_DistillationTower
protected int getCurrentLayerOutputHatchCount() {
return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 0
- : mOutputHatchesByLayer.get(mHeight - 1).size();
+ : mOutputHatchesByLayer.get(mHeight - 1)
+ .size();
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -264,7 +321,8 @@ public class GT_MetaTileEntity_DistillationTower
while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>());
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
- return mOutputHatchesByLayer.get(mHeight - 1).add(tHatch);
+ return mOutputHatchesByLayer.get(mHeight - 1)
+ .add(tHatch);
}
@Override
@@ -294,7 +352,8 @@ public class GT_MetaTileEntity_DistillationTower
if (!checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0)) {
return false;
}
- if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1).isEmpty())
+ if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1)
+ .isEmpty())
// layer without output hatch
return false;
if (mTopLayerFound) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
index 55ccfd6230..a0c62ae2a7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -63,29 +63,41 @@ public abstract class GT_MetaTileEntity_DrillerBase
@Override
protected IStructureDefinition<GT_MetaTileEntity_DrillerBase> computeValue(Class<?> type) {
return StructureDefinition.<GT_MetaTileEntity_DrillerBase>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { " ", " f ", " " }, { " ", " f ", " " },
- { " ", " f ", " " }, { " f ", "fcf", " f " }, { " f ", "fcf", " f " },
- { " f ", "fcf", " f " }, { "b~b", "bbb", "bbb" }, }))
- .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial())))
- .addElement(
- 'c',
- lazy(
- t -> ofBlock(
- t.getCasingBlockItem().getBlock(),
- t.getCasingBlockItem().get(0).getItemDamage())))
- .addElement(
- 'b',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_DrillerBase.class)
- .atLeastList(t.getAllowedHatches())
- .adder(GT_MetaTileEntity_DrillerBase::addToMachineList)
- .casingIndex(t.casingTextureIndex).dot(1).buildAndChain(
- t.getCasingBlockItem().getBlock(),
- t.getCasingBlockItem().get(0).getItemDamage())))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " f ", " " }, { " ", " f ", " " },
+ { " ", " f ", " " }, { " f ", "fcf", " f " },
+ { " f ", "fcf", " f " }, { " f ", "fcf", " f " },
+ { "b~b", "bbb", "bbb" }, }))
+ .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial())))
+ .addElement(
+ 'c',
+ lazy(
+ t -> ofBlock(
+ t.getCasingBlockItem()
+ .getBlock(),
+ t.getCasingBlockItem()
+ .get(0)
+ .getItemDamage())))
+ .addElement(
+ 'b',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_DrillerBase.class).atLeastList(
+ t.getAllowedHatches())
+ .adder(
+ GT_MetaTileEntity_DrillerBase::addToMachineList)
+ .casingIndex(
+ t.casingTextureIndex)
+ .dot(1)
+ .buildAndChain(
+ t.getCasingBlockItem()
+ .getBlock(),
+ t.getCasingBlockItem()
+ .get(0)
+ .getItemDamage())))
+ .build();
}
};
@@ -126,7 +138,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
private void initFields() {
casingBlock = getCasingBlockItem().getBlock();
- casingMeta = getCasingBlockItem().get(0).getItemDamage();
+ casingMeta = getCasingBlockItem().get(0)
+ .getItemDamage();
int frameId = 4096 + getFrameMaterial().mMetaItemSubID;
frameMeta = GregTech_API.METATILEENTITIES[frameId] != null
? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType()
@@ -139,12 +152,26 @@ public abstract class GT_MetaTileEntity_DrillerBase
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ORE_DRILL_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ORE_DRILL)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { getCasingTextureForId(casingTextureIndex) };
}
@@ -210,9 +237,14 @@ public abstract class GT_MetaTileEntity_DrillerBase
protected boolean tryPickPipe() {
if (yHead == yDrill) return isPickingPipes = false;
if (tryOutputPipe()) {
- if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W))
- getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock);
- getBaseMetaTileEntity().getWorld().setBlockToAir(xPipe, yHead, zPipe);
+ if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W)) getBaseMetaTileEntity().getWorld()
+ .setBlock(
+ xPipe,
+ yHead + 1,
+ zPipe,
+ miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld()
+ .setBlockToAir(xPipe, yHead, zPipe);
return isPickingPipes = true;
}
return isPickingPipes = false;
@@ -259,7 +291,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
isSimulating))
return 3;
if (!isSimulating) {
- if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock);
+ if (yHead != yDrill) getBaseMetaTileEntity().getWorld()
+ .setBlock(xPipe, yHead, zPipe, miningPipeBlock);
if (b != miningPipeBlock && b != miningPipeTipBlock) getBaseMetaTileEntity().decrStackSize(1, 1);
}
@@ -434,7 +467,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
// is pipe tip OR is controller layer
if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true;
// pipe column is broken - try fix
- getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
return true;
}
@@ -534,10 +568,18 @@ public abstract class GT_MetaTileEntity_DrillerBase
}
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i)
+ != null
+ && isCorrectDataItem(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i),
+ state))
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index 79204817f5..3395ded360 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
@@ -47,31 +47,62 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
protected static final int CASING_INDEX = 11;
protected static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_ElectricBlastFurnace>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ttt", "tmt", "ttt" }, { "CCC", "C-C", "CCC" }, { "CCC", "C-C", "CCC" },
- { "b~b", "bbb", "bbb" } }))
- .addElement(
- 't',
- buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
- OutputHatch.withAdder(GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList)
- .withCount(t -> t.mPollutionOutputHatches.size()))
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- ofCoil(
- GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel,
- GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_ElectricBlastFurnace>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ttt", "tmt",
+ "ttt" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "b~b", "bbb",
+ "bbb" } }))
+ .addElement(
+ 't',
+ buildHatchAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList)
+ .withCount(
+ t -> t.mPollutionOutputHatches.size()))
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .addElement(
+ 'm',
+ Muffler.newAny(
+ CASING_INDEX,
+ 2))
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel,
+ GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .build();
public GT_MetaTileEntity_ElectricBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -89,22 +120,30 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Blast Furnace").addInfo("Controller block for the Electric Blast Furnace")
- .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus")
- .addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)")
- .addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
- .addInfo(
- "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
- .addInfo("Additionally gives +100K for every tier past MV")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 4, 3, true)
- .addController("Front bottom").addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false)
- .addOtherStructurePart("Heating Coils", "Two middle Layers")
- .addEnergyHatch("Any bottom layer casing", 3).addMaintenanceHatch("Any bottom layer casing", 3)
- .addMufflerHatch("Top middle", 2).addInputBus("Any bottom layer casing", 3)
- .addInputHatch("Any bottom layer casing", 3).addOutputBus("Any bottom layer casing", 3)
- .addOutputHatch("Liquid form of fluids, Any bottom layer casing")
- .addOutputHatch("Gas form of fluids, Any top layer casing", 1)
- .addStructureInfo("Recovery amount scales with Muffler Hatch tier").toolTipFinisher("Gregtech");
+ tt.addMachineType("Blast Furnace")
+ .addInfo("Controller block for the Electric Blast Furnace")
+ .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus")
+ .addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)")
+ .addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
+ .addInfo(
+ "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
+ .addInfo("Additionally gives +100K for every tier past MV")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, true)
+ .addController("Front bottom")
+ .addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false)
+ .addOtherStructurePart("Heating Coils", "Two middle Layers")
+ .addEnergyHatch("Any bottom layer casing", 3)
+ .addMaintenanceHatch("Any bottom layer casing", 3)
+ .addMufflerHatch("Top middle", 2)
+ .addInputBus("Any bottom layer casing", 3)
+ .addInputHatch("Any bottom layer casing", 3)
+ .addOutputBus("Any bottom layer casing", 3)
+ .addOutputHatch("Liquid form of fluids, Any bottom layer casing")
+ .addOutputHatch("Gas form of fluids, Any top layer casing", 1)
+ .addStructureInfo("Recovery amount scales with Muffler Hatch tier")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -112,14 +151,26 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing()
- .glow().build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -153,9 +204,14 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
tBus.mRecipeMap = getRecipeMap();
if (isValidMetaTileEntity(tBus)) {
- for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) {
- tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = tBus.getBaseMetaTileEntity()
+ .getSizeInventory()
+ - 1; i >= 0; i--) {
+ if (tBus.getBaseMetaTileEntity()
+ .getStackInSlot(i) != null) {
+ tInputs.add(
+ tBus.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
@@ -176,8 +232,12 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes
- .findRecipe(getBaseMetaTileEntity(), false, V[tTier], tFluids, tItems);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ V[tTier],
+ tFluids,
+ tItems);
if (tRecipe == null) return false;
if (this.mHeatingCapacity < tRecipe.mSpecialValue) return false;
@@ -322,8 +382,10 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
if (!isValidMetaTileEntity(tHatch)) continue;
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
return new String[] {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
index 78e059db2a..e9ed294fc2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
@@ -37,21 +37,28 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Combustion Generator").addInfo("Controller block for the Extreme Combustion Engine")
- .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run")
- .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)")
- .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency")
- .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency")
- .addInfo("You need to wait for it to reach 300% to output full power")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
- .addController("Front center").addCasingInfoRange("Robust Tungstensteel Machine Casing", 16, 22, false)
- .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
- .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
- .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
- .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1)
- .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
- .addInputHatch("HOG, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1)
- .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Combustion Generator")
+ .addInfo("Controller block for the Extreme Combustion Engine")
+ .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run")
+ .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)")
+ .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency")
+ .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency")
+ .addInfo("You need to wait for it to reach 300% to output full power")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfoRange("Robust Tungstensteel Machine Casing", 16, 22, false)
+ .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
+ .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
+ .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
+ .addDynamoHatch("Back center", 2)
+ .addMaintenanceHatch("One of the casings next to a Gear Box", 1)
+ .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
+ .addInputHatch("HOG, next to a Gear Box", 1)
+ .addInputHatch("Lubricant, next to a Gear Box", 1)
+ .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -64,14 +71,26 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][60],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][60],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][60], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][60], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_EXTREME_DIESEL_ENGINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][60] };
}
@@ -164,8 +183,10 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 34da12c590..869e1b53f8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -66,53 +66,85 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
protected IStructureDefinition<GT_MetaTileEntity_FusionComputer> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] {
- { " ", " ihi ", " hh hh ", " h h ",
- " h h ", " h h ", " i i ", " h h ",
- " i i ", " h h ", " h h ", " h h ",
- " hh hh ", " ihi ", " ", },
- { " xhx ", " hhccchh ", " eccxhxcce ", " eceh hece ",
- " hce ech ", " hch hch ", "xcx xcx", "hch hch",
- "xcx xcx", " hch hch ", " hce ech ", " eceh hece ",
- " eccx~xcce ", " hhccchh ", " xhx ", },
- { " ", " ihi ", " hh hh ", " h h ",
- " h h ", " h h ", " i i ", " h h ",
- " i i ", " h h ", " h h ", " h h ",
- " hh hh ", " ihi ", " ", } }))
- .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta())))
- .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'i',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class)
- .atLeast(
- ImmutableMap.of(
- InputHatch.withAdder(
- GT_MetaTileEntity_FusionComputer::addInjector),
- 2))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(1).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'e',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class).atLeast(
- ImmutableMap.of(
- Energy.withAdder(
- GT_MetaTileEntity_FusionComputer::addEnergyInjector),
- 16))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(2).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'x',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class).atLeast(
- OutputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addExtractor))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(3).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " ihi ",
+ " hh hh ", " h h ", " h h ",
+ " h h ", " i i ", " h h ",
+ " i i ", " h h ", " h h ",
+ " h h ", " hh hh ", " ihi ",
+ " ", },
+ { " xhx ", " hhccchh ", " eccxhxcce ",
+ " eceh hece ", " hce ech ",
+ " hch hch ", "xcx xcx",
+ "hch hch", "xcx xcx",
+ " hch hch ", " hce ech ",
+ " eceh hece ", " eccx~xcce ",
+ " hhccchh ", " xhx ", },
+ { " ", " ihi ", " hh hh ",
+ " h h ", " h h ",
+ " h h ", " i i ",
+ " h h ", " i i ",
+ " h h ", " h h ",
+ " h h ", " hh hh ",
+ " ihi ", " ", } }))
+ .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta())))
+ .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta())))
+ .addElement(
+ 'i',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ ImmutableMap.of(
+ InputHatch.withAdder(
+ GT_MetaTileEntity_FusionComputer::addInjector),
+ 2))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(1)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .addElement(
+ 'e',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ ImmutableMap.of(
+ Energy.withAdder(
+ GT_MetaTileEntity_FusionComputer::addEnergyInjector),
+ 16))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(2)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .addElement(
+ 'x',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_FusionComputer::addExtractor))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(3)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .build();
}
};
public GT_Recipe mLastRecipe;
@@ -122,9 +154,15 @@ public abstract class GT_MetaTileEntity_FusionComputer
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()));
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .extFacing()
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) {
@@ -172,10 +210,13 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addController("Fusion Reactor").addInfo("Some kind of fusion reactor, maybe").addSeparator()
- .addInfo("Some kind of fusion reactor, maybe")
- .addStructureInfo("Should probably be built similar to other fusions")
- .addStructureInfo("See controller tooltip for details").toolTipFinisher("Gregtech");
+ tt.addController("Fusion Reactor")
+ .addInfo("Some kind of fusion reactor, maybe")
+ .addSeparator()
+ .addInfo("Some kind of fusion reactor, maybe")
+ .addStructureInfo("Should probably be built similar to other fusions")
+ .addStructureInfo("See controller tooltip for details")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -238,11 +279,16 @@ public abstract class GT_MetaTileEntity_FusionComputer
@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 (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() };
+ return new ITexture[] { TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS)
+ .extFacing()
+ .build() };
}
/**
@@ -290,8 +336,12 @@ public abstract class GT_MetaTileEntity_FusionComputer
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
GT_Recipe tRecipe;
- tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes
- .findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids);
+ tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ this.mLastRecipe,
+ false,
+ GT_Values.V[tier()],
+ tFluids);
if (tRecipe == null) {
tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.findRecipe(
this.getBaseMetaTileEntity(),
@@ -363,8 +413,9 @@ public abstract class GT_MetaTileEntity_FusionComputer
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
if (isValidMetaTileEntity(tHatch)) {
long energyToMove = GT_Values.V[tier()] / 16;
- if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() && tHatch
- .getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) {
+ if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore()
+ && tHatch.getBaseMetaTileEntity()
+ .decreaseStoredEnergyUnits(energyToMove, false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true);
}
}
@@ -373,7 +424,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
criticalStopMachine();
}
if (mMaxProgresstime > 0) {
- this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
+ this.getBaseMetaTileEntity()
+ .decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputItems != null)
for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack);
@@ -390,7 +442,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
try {
GT_Mod.achievements.issueAchivementHatchFluid(
aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ .getPlayerEntityByName(
+ aBaseMetaTileEntity.getOwnerName()),
mOutputFluids[0]);
} catch (Exception ignored) {}
}
@@ -420,8 +473,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
stopMachine();
}
}
- aBaseMetaTileEntity
- .setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
+ aBaseMetaTileEntity.setErrorDisplayID(
+ (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -534,8 +587,9 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17)
- .setPos(155, 145));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(155, 145));
}
@Override
@@ -557,59 +611,77 @@ public abstract class GT_MetaTileEntity_FusionComputer
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")).setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mMachine).setPos(10, 8))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val))
- .widget(
- new TextWidget("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setTextAlignment(Alignment.Center)
- .setEnabled(
- widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && !getBaseMetaTileEntity().isActive())
- .setPos(-getGUIWidth() / 2, 170).setSize(getGUIWidth() * 2, 9))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(
- new FakeSyncWidget.BooleanSyncer(
- () -> getBaseMetaTileEntity().isActive(),
- val -> getBaseMetaTileEntity().setActive(val)))
- .widget(
- new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get())
- .setTextAlignment(Alignment.Center)
- .setEnabled(
- widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive())
- .setPos(0, 170).setSize(getGUIWidth(), 9))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(
- new ProgressBar()
- .setProgress(
- () -> (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity())
- .setDirection(ProgressBar.Direction.RIGHT)
- .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147).setPos(5, 156).setSize(147, 5))
- .widget(TextWidget.dynamicString(() -> {
- long energy = getBaseMetaTileEntity().getStoredEU();
- if (energy > 160_000_000L && energy < 160_010_000L) {
- energy = 160_000_000L;
- }
- if (energy > 320_000_000L && energy < 320_010_000L) {
- energy = 320_000_000L;
- }
- if (energy > 640_000_000L && energy < 640_010_000L) {
- energy = 640_000_000L;
- }
- if (energy > 5_120_000_000L && energy < 5_120_080_000L) {
- energy = 5_120_000_000L;
- }
- return GT_Utility.formatNumbers(energy) + " EU";
- }).setDefaultColor(COLOR_TEXT_RED.get()).setPos(50, 155)).widget(
- new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName)
- .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI)
- .setPos(154, 4).setSize(18, 18));
+ .setEnabled(widget -> !mMachine)
+ .setPos(10, 8))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val))
+ .widget(
+ new TextWidget(
+ "Hit with Soft Mallet to (re-)start the Machine if it doesn't start.").setDefaultColor(
+ COLOR_TEXT_WHITE.get())
+ .setTextAlignment(
+ Alignment.Center)
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0
+ && !getBaseMetaTileEntity().isActive())
+ .setPos(
+ -getGUIWidth()
+ / 2,
+ 170)
+ .setSize(
+ getGUIWidth()
+ * 2,
+ 9))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val)))
+ .widget(
+ new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setTextAlignment(Alignment.Center)
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0 && getBaseMetaTileEntity().isActive())
+ .setPos(0, 170)
+ .setSize(getGUIWidth(), 9))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(
+ new ProgressBar().setProgress(
+ () -> (float) getBaseMetaTileEntity().getStoredEU()
+ / getBaseMetaTileEntity().getEUCapacity())
+ .setDirection(ProgressBar.Direction.RIGHT)
+ .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147)
+ .setPos(5, 156)
+ .setSize(147, 5))
+ .widget(TextWidget.dynamicString(() -> {
+ long energy = getBaseMetaTileEntity().getStoredEU();
+ if (energy > 160_000_000L && energy < 160_010_000L) {
+ energy = 160_000_000L;
+ }
+ if (energy > 320_000_000L && energy < 320_010_000L) {
+ energy = 320_000_000L;
+ }
+ if (energy > 640_000_000L && energy < 640_010_000L) {
+ energy = 640_000_000L;
+ }
+ if (energy > 5_120_000_000L && energy < 5_120_080_000L) {
+ energy = 5_120_000_000L;
+ }
+ return GT_Utility.formatNumbers(energy) + " EU";
+ })
+ .setDefaultColor(COLOR_TEXT_RED.get())
+ .setPos(50, 155))
+ .widget(
+ new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName)
+ .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI)
+ .setPos(154, 4)
+ .setSize(18, 18));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
index 7742af798a..382e2c6c6e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION1).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor").addInfo("It's over 9000!!!")
- .addInfo("Controller block for the Fusion Reactor Mk I")
- .addInfo("2048EU/t and 10M EU capacity per Energy Hatch")
- .addInfo("If the recipe has a startup cost greater than the")
- .addInfo("number of energy hatches * cap, you can't do it").addSeparator()
- .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
- .addCasingInfoRange("LuV Machine Casing", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be LuV or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("It's over 9000!!!")
+ .addInfo("Controller block for the Fusion Reactor Mk I")
+ .addInfo("2048EU/t and 10M EU capacity per Energy Hatch")
+ .addInfo("If the recipe has a startup cost greater than the")
+ .addInfo("number of energy hatches * cap, you can't do it")
+ .addSeparator()
+ .beginStructureBlock(15, 3, 15, false)
+ .addController("See diagram when placed")
+ .addCasingInfoRange("LuV Machine Casing", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring")
+ .addEnergyHatch("1-16, Specified casings", 2)
+ .addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3)
+ .addStructureInfo("ALL Hatches must be LuV or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
index de7a54ae93..5a5e884cb8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION2).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION2)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION2_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 7);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor").addInfo("It's over 9000!!!")
- .addInfo("Controller block for the Fusion Reactor Mk II")
- .addInfo("8192EU/t and 20M EU capacity per Energy Hatch")
- .addInfo("If the recipe has a startup cost greater than the")
- .addInfo("number of energy hatches * cap, you can't do it").addSeparator()
- .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
- .addCasingInfoRange("Fusion Machine Casing", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be ZPM or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("It's over 9000!!!")
+ .addInfo("Controller block for the Fusion Reactor Mk II")
+ .addInfo("8192EU/t and 20M EU capacity per Energy Hatch")
+ .addInfo("If the recipe has a startup cost greater than the")
+ .addInfo("number of energy hatches * cap, you can't do it")
+ .addSeparator()
+ .beginStructureBlock(15, 3, 15, false)
+ .addController("See diagram when placed")
+ .addCasingInfoRange("Fusion Machine Casing", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
+ .addEnergyHatch("1-16, Specified casings", 2)
+ .addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3)
+ .addStructureInfo("ALL Hatches must be ZPM or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
index 09d8a46c26..2d5c6111fd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION3).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION3)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION3_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 8);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor").addInfo("A SUN DOWN ON EARTH")
- .addInfo("Controller block for the Fusion Reactor Mk III")
- .addInfo("32768EU/t and 40M EU capacity per Energy Hatch")
- .addInfo("If the recipe has a startup cost greater than the")
- .addInfo("number of energy hatches * cap, you can't do it").addSeparator()
- .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
- .addCasingInfoRange("Fusion Machine Casing Mk II", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be UV or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("A SUN DOWN ON EARTH")
+ .addInfo("Controller block for the Fusion Reactor Mk III")
+ .addInfo("32768EU/t and 40M EU capacity per Energy Hatch")
+ .addInfo("If the recipe has a startup cost greater than the")
+ .addInfo("number of energy hatches * cap, you can't do it")
+ .addSeparator()
+ .beginStructureBlock(15, 3, 15, false)
+ .addController("See diagram when placed")
+ .addCasingInfoRange("Fusion Machine Casing Mk II", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
+ .addEnergyHatch("1-16, Specified casings", 2)
+ .addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3)
+ .addStructureInfo("ALL Hatches must be UV or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
index 4405044703..ceb901c5ad 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
@@ -42,33 +42,68 @@ public class GT_MetaTileEntity_HeatExchanger extends
private static final int dryHeatMaximum = 2000; // 2000 ticks = 100 seconds
private static final int CASING_INDEX = 50;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_HeatExchanger>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cCc", "ccc" }, { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
- { "c~c", "cHc", "ccc" }, }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 14))
- .addElement(
- 'C',
- OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList)
- .withCount(t -> isValidMetaTileEntity(t.mOutputColdFluidHatch) ? 1 : 0)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'H',
- OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList)
- .withCount(t -> isValidMetaTileEntity(t.mInputHotFluidHatch) ? 1 : 0)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'c',
- buildHatchAdder(GT_MetaTileEntity_HeatExchanger.class)
- .atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_HeatExchanger::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, (byte) 2))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_HeatExchanger>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cCc",
+ "ccc" },
+ { "ccc", "cPc",
+ "ccc" },
+ { "ccc", "cPc",
+ "ccc" },
+ { "c~c", "cHc",
+ "ccc" }, }))
+ .addElement(
+ 'P',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 14))
+ .addElement(
+ 'C',
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList)
+ .withCount(
+ t -> isValidMetaTileEntity(
+ t.mOutputColdFluidHatch)
+ ? 1
+ : 0)
+ .newAny(
+ CASING_INDEX,
+ 3))
+ .addElement(
+ 'H',
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList)
+ .withCount(
+ t -> isValidMetaTileEntity(
+ t.mInputHotFluidHatch)
+ ? 1
+ : 0)
+ .newAny(
+ CASING_INDEX,
+ 3))
+ .addElement(
+ 'c',
+ buildHatchAdder(
+ GT_MetaTileEntity_HeatExchanger.class).atLeast(
+ InputBus,
+ InputHatch,
+ OutputBus,
+ OutputHatch,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_HeatExchanger::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ (byte) 2))))
+ .build();
public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25)
private GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch;
@@ -93,17 +128,24 @@ public class GT_MetaTileEntity_HeatExchanger extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Heat Exchanger").addInfo("Controller Block for the Large Heat Exchanger")
- .addInfo("More complicated than a Fusion Reactor. Seriously").addInfo("Inputs are Hot Coolant or Lava")
- .addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam")
- .addInfo("Read the wiki article to understand how it works")
- .addInfo("Then go to the Discord to understand the wiki").addSeparator()
- .beginStructureBlock(3, 4, 3, false).addController("Front bottom")
- .addCasingInfoRange("Stable Titanium Machine Casing", 20, 32, false)
- .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks").addMaintenanceHatch("Any casing", 1)
- .addInputHatch("Hot fluid, bottom center", 2).addInputHatch("Distilled water, any casing", 1)
- .addOutputHatch("Cold fluid, top center", 3).addOutputHatch("Steam/SH Steam, any casing", 1)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Heat Exchanger")
+ .addInfo("Controller Block for the Large Heat Exchanger")
+ .addInfo("More complicated than a Fusion Reactor. Seriously")
+ .addInfo("Inputs are Hot Coolant or Lava")
+ .addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam")
+ .addInfo("Read the wiki article to understand how it works")
+ .addInfo("Then go to the Discord to understand the wiki")
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, false)
+ .addController("Front bottom")
+ .addCasingInfoRange("Stable Titanium Machine Casing", 20, 32, false)
+ .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks")
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Hot fluid, bottom center", 2)
+ .addInputHatch("Distilled water, any casing", 1)
+ .addOutputHatch("Cold fluid, top center", 3)
+ .addOutputHatch("Steam/SH Steam, any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -125,13 +167,26 @@ public class GT_MetaTileEntity_HeatExchanger extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_HEAT_EXCHANGER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -162,7 +217,8 @@ public class GT_MetaTileEntity_HeatExchanger extends
boolean do_solarSalt = false;
// Do we have an integrated circuit with a valid configuration?
- if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) {
+ if (mInventory[1] != null && mInventory[1].getUnlocalizedName()
+ .startsWith("gt.integrated_circuit")) {
int circuit_config = mInventory[1].getItemDamage();
if (circuit_config >= 1 && circuit_config <= 25) {
// If so, apply the penalty and reduced threshold.
@@ -177,19 +233,26 @@ public class GT_MetaTileEntity_HeatExchanger extends
steam_output_multiplier /= 5f; // lava is not boosted
superheated_threshold /= 4f; // unchanged
do_lava = true;
- } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) {
- steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 -> nerf with this code back to 5x
- superheated_threshold /= 5f; // 10x smaller since the Hot Things production in reactor is the same.
- do_coolant = true;
- } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("molten.solarsalthot", 1))) {
- steam_output_multiplier *= 2.5f; // Solar Salt:Steam value is 5x higher than Hot Coolant's value
- superheated_threshold /= 25f; // Given that, multiplier is 5x higher and threshold is 5x lower
- do_solarSalt = true;
- } else {
- // If we're working with neither, fail out
- superheated_threshold = 0;
- return false;
- }
+ } else if (mInputHotFluidHatch.getFluid()
+ .isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) {
+ steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 ->
+ // nerf with this code back to 5x
+ superheated_threshold /= 5f; // 10x smaller since the Hot Things production in
+ // reactor is the same.
+ do_coolant = true;
+ } else
+ if (mInputHotFluidHatch.getFluid()
+ .isFluidEqual(FluidRegistry.getFluidStack("molten.solarsalthot", 1))) {
+ steam_output_multiplier *= 2.5f; // Solar Salt:Steam value is 5x higher than Hot
+ // Coolant's value
+ superheated_threshold /= 25f; // Given that, multiplier is 5x higher and
+ // threshold is 5x lower
+ do_solarSalt = true;
+ } else {
+ // If we're working with neither, fail out
+ superheated_threshold = 0;
+ return false;
+ }
superheated = fluidAmountToConsume >= superheated_threshold; // set the internal superheated flag if we have
// enough hot fluid. Used in the
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
index ca9c31f350..fede7c283d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
@@ -43,13 +43,21 @@ public class GT_MetaTileEntity_ImplosionCompressor
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Implosion Compressor").addInfo("Explosions are fun")
- .addInfo("Controller block for the Implosion Compressor")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front center").addCasingInfoRange("Solid Steel Machine Casing", 16, 24, false)
- .addStructureInfo("Casings can be replaced with Explosion Warning Signs")
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addMufflerHatch("Any casing", 1)
- .addInputBus("Any casing", 1).addOutputBus("Any casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Implosion Compressor")
+ .addInfo("Explosions are fun")
+ .addInfo("Controller block for the Implosion Compressor")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Solid Steel Machine Casing", 16, 24, false)
+ .addStructureInfo("Casings can be replaced with Explosion Warning Signs")
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addMufflerHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -63,14 +71,26 @@ public class GT_MetaTileEntity_ImplosionCompressor
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_IMPLOSION_COMPRESSOR)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] };
}
@@ -105,8 +125,12 @@ public class GT_MetaTileEntity_ImplosionCompressor
}
ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]);
if (!tInputList.isEmpty()) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes
- .findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ 9223372036854775807L,
+ null,
+ tInputs);
if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
index dc186dadeb..832d376dc6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
@@ -54,65 +54,184 @@ public class GT_MetaTileEntity_IntegratedOreFactory
private static final int CASING_INDEX2 = 49;
private static final int MAX_PARA = 1024;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_IntegratedOreFactory>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] {
- { " ", " ", " WWW ", " WWW ", " ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { " ", " sss ", " s s", " s s", " sss ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { " ", " sss ", " s s", " s s", " sss ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { "iiiiii ", "iIIIIiisssi", "iIIIIis s", "iIIIIis s", "iIIIIiisssi",
- "iiiiii " },
- { "iggggi ", "gt t isssi", "g xx sppps", "g xx sppps", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t isssi", "g xx s s", "g xx s s", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t is~si", "g xx spppO", "g xx spppO", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t isssi", "g xx s O", "g xx s O", "gt t isssi",
- "iggggi " },
- { "EEEEEE ", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE",
- "EEEEEE " } }))
- .addElement('i', ofBlock(GregTech_API.sBlockCasings8, 7))
- .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'g',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement('x', ofBlock(GregTech_API.sBlockCasings2, 3))
- .addElement('p', ofBlock(GregTech_API.sBlockCasings2, 15)).addElement('t', ofFrame(Materials.TungstenSteel))
- .addElement(
- 'E',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(Energy, Maintenance)
- .casingIndex(CASING_INDEX1).dot(1).buildAndChain(GregTech_API.sBlockCasings8, 7))
- .addElement(
- 'I',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(InputBus)
- .casingIndex(CASING_INDEX1).dot(2).buildAndChain(GregTech_API.sBlockCasings8, 7))
- .addElement(
- 'W',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(InputHatch, Muffler)
- .casingIndex(CASING_INDEX2).dot(3).buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'O',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(OutputBus, OutputHatch)
- .casingIndex(CASING_INDEX2).dot(4).buildAndChain(GregTech_API.sBlockCasings4, 1))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_IntegratedOreFactory>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " ",
+ " ",
+ " WWW ",
+ " WWW ",
+ " ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " s s",
+ " s s",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " s s",
+ " s s",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { "iiiiii ",
+ "iIIIIiisssi",
+ "iIIIIis s",
+ "iIIIIis s",
+ "iIIIIiisssi",
+ "iiiiii " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx sppps",
+ "g xx sppps",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx s s",
+ "g xx s s",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t is~si",
+ "g xx spppO",
+ "g xx spppO",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx s O",
+ "g xx s O",
+ "gt t isssi",
+ "iggggi " },
+ { "EEEEEE ",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEE " } }))
+ .addElement(
+ 'i',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 's',
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'g',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'x',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 3))
+ .addElement(
+ 'p',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 15))
+ .addElement(
+ 't',
+ ofFrame(
+ Materials.TungstenSteel))
+ .addElement(
+ 'E',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ Energy,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX1)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 'I',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ InputBus)
+ .casingIndex(
+ CASING_INDEX1)
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 'W',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ InputHatch,
+ Muffler)
+ .casingIndex(
+ CASING_INDEX2)
+ .dot(
+ 3)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'O',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ OutputBus,
+ OutputHatch)
+ .casingIndex(
+ CASING_INDEX2)
+ .dot(
+ 4)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .build();
private static final HashSet<Integer> isCrushedOre = new HashSet<>();
private static final HashSet<Integer> isCrushedPureOre = new HashSet<>();
@@ -188,20 +307,31 @@ public class GT_MetaTileEntity_IntegratedOreFactory
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Ore Processor").addInfo("Controller Block for the Integrated Ore Factory")
- .addInfo("It is OP. I mean ore processor.").addInfo("Do all ore procession in one step.")
- .addInfo("Can process up to 1024 ores per time.")
- .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.")
- .addInfo("Process time is depend on mode.").addInfo("Use a screwdriver to switch mode.")
- .addInfo("Sneak click with screwdriver to void the stone dusts.").addSeparator()
- .beginStructureBlock(6, 12, 11, false).addController("The third layer")
- .addStructureInfo("128 advanced iridium plated machine casing")
- .addStructureInfo("105 clean stainless steel machine casing").addStructureInfo("48 reinforced glass")
- .addStructureInfo("30 tungstensteel pipe casing").addStructureInfo("16 tungstensteel frame box")
- .addStructureInfo("16 steel gear box casing").addEnergyHatch("Button Casing", 1)
- .addMaintenanceHatch("Button Casing", 1).addInputBus("Input ore/crushed ore", 2)
- .addInputHatch("Input lubricant/distilled water/washing chemicals", 3)
- .addMufflerHatch("Output Pollution", 3).addOutputBus("Output products", 4).toolTipFinisher("Gregtech");
+ tt.addMachineType("Ore Processor")
+ .addInfo("Controller Block for the Integrated Ore Factory")
+ .addInfo("It is OP. I mean ore processor.")
+ .addInfo("Do all ore procession in one step.")
+ .addInfo("Can process up to 1024 ores per time.")
+ .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.")
+ .addInfo("Process time is depend on mode.")
+ .addInfo("Use a screwdriver to switch mode.")
+ .addInfo("Sneak click with screwdriver to void the stone dusts.")
+ .addSeparator()
+ .beginStructureBlock(6, 12, 11, false)
+ .addController("The third layer")
+ .addStructureInfo("128 advanced iridium plated machine casing")
+ .addStructureInfo("105 clean stainless steel machine casing")
+ .addStructureInfo("48 reinforced glass")
+ .addStructureInfo("30 tungstensteel pipe casing")
+ .addStructureInfo("16 tungstensteel frame box")
+ .addStructureInfo("16 steel gear box casing")
+ .addEnergyHatch("Button Casing", 1)
+ .addMaintenanceHatch("Button Casing", 1)
+ .addInputBus("Input ore/crushed ore", 2)
+ .addInputHatch("Input lubricant/distilled water/washing chemicals", 3)
+ .addMufflerHatch("Output Pollution", 3)
+ .addOutputBus("Output products", 4)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -399,8 +529,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -447,8 +581,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -469,8 +607,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -491,8 +633,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -520,7 +666,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory
getStoredFluids().toArray(new FluidStack[0]),
aStack);
if (tRecipe != null && tRecipe.getRepresentativeFluidInput(0) != null) {
- FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0).copy();
+ FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0)
+ .copy();
int tStored = getFluidAmount(tInputFluid);
int tWashed = Math.min(tStored / tInputFluid.amount, aStack.stackSize);
depleteInput(new FluidStack(tInputFluid.getFluid(), tWashed * tInputFluid.amount));
@@ -569,7 +716,9 @@ public class GT_MetaTileEntity_IntegratedOreFactory
GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i)));
}
}
- return tOutput.stream().filter(i -> (i != null && i.stackSize > 0)).collect(Collectors.toList());
+ return tOutput.stream()
+ .filter(i -> (i != null && i.stackSize > 0))
+ .collect(Collectors.toList());
}
private void doCompress(List<ItemStack> aList) {
@@ -655,12 +804,25 @@ public class GT_MetaTileEntity_IntegratedOreFactory
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2) };
}
@@ -669,13 +831,13 @@ public class GT_MetaTileEntity_IntegratedOreFactory
final EnumChatFormatting AQUA = EnumChatFormatting.AQUA;
final String CRUSH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Macerate");
final String WASH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Ore_Washer")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String THERMAL = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Thermal_Centrifuge")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String CENTRIFUGE = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Centrifuge");
final String SIFTER = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Sifter");
final String CHEM_WASH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Chemical_Bathing")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String ARROW = " " + AQUA + "-> ";
List<String> des = new ArrayList<>();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index 6bd2da57db..d6fdc56854 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -51,30 +51,47 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_LargeBoiler> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "ccc", "ccc" }, { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
- { "ccc", "cPc", "ccc" }, { "f~f", "fff", "fff" }, }))
- .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta())))
- .addElement(
- 'c',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class).atLeast(OutputHatch)
- .casingIndex(t.getCasingTextureIndex()).dot(2).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeBoiler::onCasingAdded,
- ofBlock(t.getCasingBlock(), t.getCasingMeta())))))
- .addElement(
- 'f',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class)
- .atLeast(Maintenance, InputHatch, InputBus, Muffler)
- .casingIndex(t.getFireboxTextureIndex()).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeBoiler::onFireboxAdded,
- ofBlock(t.getFireboxBlock(), t.getFireboxMeta())))))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccc", "ccc", "ccc" }, { "ccc", "cPc", "ccc" },
+ { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
+ { "f~f", "fff", "fff" }, }))
+ .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta())))
+ .addElement(
+ 'c',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeBoiler.class).atLeast(OutputHatch)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(2)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeBoiler::onCasingAdded,
+ ofBlock(
+ t.getCasingBlock(),
+ t.getCasingMeta())))))
+ .addElement(
+ 'f',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeBoiler.class).atLeast(
+ Maintenance,
+ InputHatch,
+ InputBus,
+ Muffler)
+ .casingIndex(
+ t.getFireboxTextureIndex())
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeBoiler::onFireboxAdded,
+ ofBlock(
+ t.getFireboxBlock(),
+ t.getFireboxMeta())))))
+ .build();
}
};
private boolean firstRun = true;
@@ -99,7 +116,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Boiler").addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler");
+ tt.addMachineType("Boiler")
+ .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler");
// Tooltip differs between the boilers that output Superheated Steam (Titanium and Tungstensteel) and the ones
// that do not (Bronze and Steel)
if (isSuperheated()) {
@@ -108,31 +126,37 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
+ "L of Superheated Steam with 1 Coal at "
+ formatNumbers((getEUt() * 40L) / superToNormalSteam)
+ "L/s") // ?
- .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
- .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)")
- .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!");
+ .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
+ .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)")
+ .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!");
} else {
tt.addInfo(
"Produces " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f))
+ "L of Steam with 1 Coal at "
+ formatNumbers(getEUt() * 40)
+ "L/s") // ?
- .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
- .addInfo("Solid Fuels with a burn value that is too high or too low will not work");
+ .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
+ .addInfo("Solid Fuels with a burn value that is too high or too low will not work");
}
tt.addInfo(
String.format(
"Diesel fuels have 1/4 efficiency - Takes %s seconds to heat up",
formatNumbers(500.0 / getEfficiencyIncrease()))) // ? check semifluid again
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 5, 3, false)
- .addController("Front bottom")
- .addCasingInfoRange(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24, 31, false) // ?
- .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum")
- .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks")
- .addMaintenanceHatch("Any firebox", 1).addMufflerHatch("Any firebox", 1)
- .addInputBus("Solid fuel, Any firebox", 1).addInputHatch("Liquid fuel, Any firebox", 1)
- .addStructureInfo("You can use either, or both").addInputHatch("Water, Any firebox", 1)
- .addOutputHatch("Steam, any casing", 2).toolTipFinisher("Gregtech");
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 5, 3, false)
+ .addController("Front bottom")
+ .addCasingInfoRange(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24, 31, false) // ?
+ .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum")
+ .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks")
+ .addMaintenanceHatch("Any firebox", 1)
+ .addMufflerHatch("Any firebox", 1)
+ .addInputBus("Solid fuel, Any firebox", 1)
+ .addInputHatch("Liquid fuel, Any firebox", 1)
+ .addStructureInfo("You can use either, or both")
+ .addInputHatch("Water, Any firebox", 1)
+ .addOutputHatch("Steam, any casing", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -179,12 +203,25 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_BOILER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) };
}
@@ -379,7 +416,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
if (mProgresstime > 0 && firstRun) {
firstRun = false;
GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ aBaseMetaTileEntity.getWorld()
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"extremepressure");
}
super.onPostTick(aBaseMetaTileEntity, aTick);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index 70d9250206..4c717a85a8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -43,32 +43,64 @@ public class GT_MetaTileEntity_LargeChemicalReactor
private static final int CASING_INDEX = 176;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_LargeChemicalReactor>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cxc", "ccc" }, { "c~c", "xPx", "cxc" },
- { "ccc", "cxc", "ccc" }, }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings8, 1))
- .addElement(
- 'c',
- buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings8, 0))))
- .addElement(
- 'x',
- buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- CoilStructureElement.INSTANCE,
- onElementPass(
- GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings8, 0))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_LargeChemicalReactor>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cxc",
+ "ccc" },
+ { "c~c", "xPx",
+ "cxc" },
+ { "ccc", "cxc",
+ "ccc" }, }))
+ .addElement(
+ 'P',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 1))
+ .addElement(
+ 'c',
+ buildHatchAdder(
+ GT_MetaTileEntity_LargeChemicalReactor.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 0))))
+ .addElement(
+ 'x',
+ buildHatchAdder(
+ GT_MetaTileEntity_LargeChemicalReactor.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ CoilStructureElement.INSTANCE,
+ onElementPass(
+ GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 0))))
+ .build();
private int mCasingAmount;
private int mCoilAmount;
@@ -89,16 +121,24 @@ public class GT_MetaTileEntity_LargeChemicalReactor
@Override
public GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Chemical Reactor").addInfo("Controller block for the Large Chemical Reactor")
- .addInfo("Does not lose efficiency when overclocked").addInfo("Accepts fluids instead of fluid cells")
- .addSeparator().beginStructureBlock(3, 3, 3, false).addController("Front center")
- .addCasingInfoRange("Chemically Inert Machine Casing", 8, 22, false)
- .addOtherStructurePart("PTFE Pipe Machine Casing", "Center")
- .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1)
- .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2)
- .addInputBus("Any casing", 1, 2).addInputHatch("Any casing", 1, 2).addOutputBus("Any casing", 1, 2)
- .addOutputHatch("Any casing", 1, 2).addStructureInfo("You can have multiple hatches/busses")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Chemical Reactor")
+ .addInfo("Controller block for the Large Chemical Reactor")
+ .addInfo("Does not lose efficiency when overclocked")
+ .addInfo("Accepts fluids instead of fluid cells")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, false)
+ .addController("Front center")
+ .addCasingInfoRange("Chemically Inert Machine Casing", 8, 22, false)
+ .addOtherStructurePart("PTFE Pipe Machine Casing", "Center")
+ .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1)
+ .addEnergyHatch("Any casing", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2)
+ .addInputBus("Any casing", 1, 2)
+ .addInputHatch("Any casing", 1, 2)
+ .addOutputBus("Any casing", 1, 2)
+ .addOutputHatch("Any casing", 1, 2)
+ .addStructureInfo("You can have multiple hatches/busses")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -106,14 +146,26 @@ public class GT_MetaTileEntity_LargeChemicalReactor
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[1][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).extFacing()
- .glow().build() };
- return new ITexture[] { casingTexturePages[1][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[1][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[1][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[1][48] };
}
@@ -159,7 +211,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor
if (mLockedToSingleRecipe) {
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
- tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore();
+ tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this)
+ .setBefore();
}
tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(
@@ -175,7 +228,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor
}
if (mLockedToSingleRecipe) {
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter()
+ .setRecipe(tRecipe)
+ .build();
}
}
@@ -288,8 +343,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor
GT_MetaTileEntity_LargeChemicalReactor gt_metaTileEntity_largeChemicalReactor, World world, int x,
int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
return BlocksToPlace.create(
- IntStream.range(0, 8).mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i))
- .collect(Collectors.toList()));
+ IntStream.range(0, 8)
+ .mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i))
+ .collect(Collectors.toList()));
}
@Override
@@ -298,7 +354,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor
if (t.mCoilAmount > 0) return PlaceResult.SKIP;
if (check(t, world, x, y, z)) return PlaceResult.SKIP;
if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return PlaceResult.REJECT;
- ItemStack result = env.getSource().takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true);
+ ItemStack result = env.getSource()
+ .takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true);
if (result == null) return PlaceResult.REJECT;
PlaceResult ret = StructureUtility.survivalPlaceBlock(
result,
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
index 1c401a741e..38c3cc9af7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
@@ -49,24 +49,34 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_LargeTurbine> computeValue(Class<?> type) {
return StructureDefinition.<GT_MetaTileEntity_LargeTurbine>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { " ", " ", " ", " ", " ", },
- { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
- { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", },
- { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
- { " ", " ", " ", " ", " ", }, }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1)))
- .addElement(
- 'h',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeTurbine.class)
- .atLeast(Maintenance, InputHatch, OutputHatch, OutputBus, InputBus, Muffler)
- .casingIndex(t.getCasingTextureIndex()).dot(2)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " ", " ", " ", " ", },
+ { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
+ { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", },
+ { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
+ { " ", " ", " ", " ", " ", }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1)))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeTurbine.class).atLeast(
+ Maintenance,
+ InputHatch,
+ OutputHatch,
+ OutputBus,
+ InputBus,
+ Muffler)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(2)
+ .buildAndChain(
+ t.getCasingBlock(),
+ t.getCasingMeta())))
+ .build();
}
};
@@ -167,7 +177,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
aX + tDirection.offsetX,
tY + tDirection.offsetY,
aZ + tDirection.offsetZ));
- tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing).setupColor(tFacing, Dyes._NULL.mRGBa);
+ tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing)
+ .setupColor(tFacing, Dyes._NULL.mRGBa);
GT_RenderUtil.renderBlockIcon(
aRenderer,
tBlock,
@@ -230,15 +241,18 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
if (baseEff == 0 || optFlow == 0
|| counter >= 512
- || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
+ || this.getBaseMetaTileEntity()
+ .hasWorkJustBeenEnabled()
+ || this.getBaseMetaTileEntity()
+ .hasInventoryBeenModified()) {
counter = 0;
baseEff = GT_Utility.safeInt(
(long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
optFlow = GT_Utility.safeInt(
(long) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
+ .getSpeedMultiplier()
* GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
* 50));
@@ -368,8 +382,10 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
String[] ret = new String[] {
@@ -420,7 +436,9 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
+ EnumChatFormatting.RESET
+ " %" /* 8 */
};
- if (!this.getClass().getName().contains("Steam"))
+ if (!this.getClass()
+ .getName()
+ .contains("Steam"))
ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.safeInt((long) realOptFlow)
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
index 99eb312b76..3acf460d3f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
@@ -32,27 +32,38 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][58] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Turbine").addInfo("Controller block for the Large Gas Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Warning: Will be capped at 8192 EU/t in a future update")
- .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option")
- // .addInfo("The excess fuel that gets consumed will be voided!")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true)
- .addController("Front center").addCasingInfoRange("Stainless Steel Turbine Casing", 8, 30, false)
- .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2)
- .addMufflerHatch("Side centered", 2).addInputHatch("Gas Fuel, Side centered", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Controller block for the Large Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Warning: Will be capped at 8192 EU/t in a future update")
+ .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option")
+ // .addInfo("The excess fuel that gets consumed will be voided!")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Stainless Steel Turbine Casing", 8, 30, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addMufflerHatch("Side centered", 2)
+ .addInputHatch("Gas Fuel, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
index f1a7427463..54787a1914 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
@@ -32,26 +32,38 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[1][57] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Turbine").addInfo("Warning: This is an experimental multiblock, subject to changes ")
- .addInfo("Controller block for the Large Advanced Gas Turbine")
- .addInfo("Needs a Turbine, place inside controller").addInfo("Only accepts gases above 800k EU/bucket")
- .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true)
- .addController("Front center").addCasingInfoRange("Advanced Gas Turbine Casing", 8, 30, false)
- .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2)
- .addMufflerHatch("Side centered", 2).addInputHatch("Gas Fuel, Side centered", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Warning: This is an experimental multiblock, subject to changes ")
+ .addInfo("Controller block for the Large Advanced Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Only accepts gases above 800k EU/bucket")
+ .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Advanced Gas Turbine Casing", 8, 30, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addMufflerHatch("Side centered", 2)
+ .addInputHatch("Gas Fuel, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
index d6e2f16a3d..ef288cf1ec 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
@@ -38,25 +38,37 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][59] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Steam Turbine").addInfo("Controller block for the Large High Pressure Steam Turbine")
- .addInfo("Needs a Turbine, place inside controller").addInfo("Outputs Steam as well as producing power")
- .addInfo("Power output depends on turbine and fitting")
- .addInfo("Use screwdriver to adjust fitting of turbine").addSeparator()
- .beginStructureBlock(3, 3, 4, true).addController("Front center")
- .addCasingInfoRange("Titanium Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Superheated Steam, Side centered", 2)
- .addOutputHatch("Steam, Side centered", 2).toolTipFinisher("Gregtech");
+ tt.addMachineType("Steam Turbine")
+ .addInfo("Controller block for the Large High Pressure Steam Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Outputs Steam as well as producing power")
+ .addInfo("Power output depends on turbine and fitting")
+ .addInfo("Use screwdriver to adjust fitting of turbine")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Titanium Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Superheated Steam, Side centered", 2)
+ .addOutputHatch("Steam, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -121,8 +133,11 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
if (!achievement) {
try {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .getPlayerEntityByName(
+ this.getBaseMetaTileEntity()
+ .getOwnerName()),
"efficientsteam");
} catch (Exception ignored) {}
achievement = true;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
index d778abbc36..22681138ea 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
@@ -38,24 +38,35 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][60] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Plasma Turbine").addInfo("Controller block for the Large Plasma Generator")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Use your Fusion Reactor to produce the Plasma").addSeparator()
- .beginStructureBlock(3, 3, 4, true).addController("Front center")
- .addCasingInfoRange("Tungstensteel Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Plasma Fluid, Side centered", 2)
- .addOutputHatch("Molten Fluid, optional, Side centered", 2).toolTipFinisher("Gregtech");
+ tt.addMachineType("Plasma Turbine")
+ .addInfo("Controller block for the Large Plasma Generator")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Use your Fusion Reactor to produce the Plasma")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Tungstensteel Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Plasma Fluid, Side centered", 2)
+ .addOutputHatch("Molten Fluid, optional, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -103,8 +114,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process.
// Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
- actualOptimalFlow = GT_Utility
- .safeInt((long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue));
+ actualOptimalFlow = GT_Utility.safeInt(
+ (long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue));
this.realOptFlow = actualOptimalFlow; // For scanner info
// Allowed to use up to 550% optimal flow rate, depending on the value of overflowMultiplier.
@@ -199,17 +210,20 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
if (!tFluids.isEmpty()) {
if (baseEff == 0 || optFlow == 0
|| counter >= 512
- || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
+ || this.getBaseMetaTileEntity()
+ .hasWorkJustBeenEnabled()
+ || this.getBaseMetaTileEntity()
+ .hasInventoryBeenModified()) {
counter = 0;
baseEff = GT_Utility.safeInt(
(long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
optFlow = GT_Utility.safeInt(
(long) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
- * ((GT_MetaGenerated_Tool) aStack.getItem())
- .getPrimaryMaterial(aStack).mToolSpeed
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
+ .getSpeedMultiplier()
+ * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(
+ aStack).mToolSpeed
* 50));
overflowMultiplier = getOverflowMultiplier(aStack);
@@ -288,8 +302,10 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
String[] ret = new String[] {
@@ -340,7 +356,9 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
+ EnumChatFormatting.RESET
+ " %" /* 8 */
};
- if (!this.getClass().getName().contains("Steam"))
+ if (!this.getClass()
+ .getName()
+ .contains("Steam"))
ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.safeInt((long) realOptFlow)
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 3ccc635d92..1f5c7a5bb6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -39,26 +39,37 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][57] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Steam Turbine").addInfo("Controller block for the Large Steam Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Outputs Distilled Water as well as producing power")
- .addInfo("Power output depends on turbine and fitting")
- .addInfo("Use screwdriver to adjust fitting of turbine").addSeparator()
- .beginStructureBlock(3, 3, 4, true).addController("Front center")
- .addCasingInfoRange("Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Steam, Side centered", 2)
- .addOutputHatch("Distilled Water, Side centered", 2).toolTipFinisher("Gregtech");
+ tt.addMachineType("Steam Turbine")
+ .addInfo("Controller block for the Large Steam Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Outputs Distilled Water as well as producing power")
+ .addInfo("Power output depends on turbine and fitting")
+ .addInfo("Use screwdriver to adjust fitting of turbine")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Steam, Side centered", 2)
+ .addOutputHatch("Distilled Water, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -130,8 +141,11 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
totalFlow += flow; // track total input used
if (!achievement) {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .getPlayerEntityByName(
+ this.getBaseMetaTileEntity()
+ .getOwnerName()),
"muchsteam");
achievement = true;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
index 95825c9eb0..0d90438020 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
@@ -49,28 +49,50 @@ public class GT_MetaTileEntity_MultiFurnace extends
private static final int CASING_INDEX = 11;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_MultiFurnace>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cmc", "ccc" }, { "CCC", "C-C", "CCC" },
- { "b~b", "bbb", "bbb" } }))
- .addElement('c', ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- GT_StructureUtility.ofCoil(
- GT_MetaTileEntity_MultiFurnace::setCoilLevel,
- GT_MetaTileEntity_MultiFurnace::getCoilLevel))
- .addElement(
- 'b',
- ofChain(
- GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder()
- .atLeast(Maintenance, InputBus, OutputBus, Energy).casingIndex(CASING_INDEX).dot(1)
- .build(),
- ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX)))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_MultiFurnace>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cmc",
+ "ccc" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "b~b", "bbb",
+ "bbb" } }))
+ .addElement(
+ 'c',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .addElement(
+ 'm',
+ Muffler.newAny(
+ CASING_INDEX,
+ 2))
+ .addElement(
+ 'C',
+ GT_StructureUtility.ofCoil(
+ GT_MetaTileEntity_MultiFurnace::setCoilLevel,
+ GT_MetaTileEntity_MultiFurnace::getCoilLevel))
+ .addElement(
+ 'b',
+ ofChain(
+ GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder()
+ .atLeast(
+ Maintenance,
+ InputBus,
+ OutputBus,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .build(),
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX)))
+ .build();
public GT_MetaTileEntity_MultiFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -88,13 +110,22 @@ public class GT_MetaTileEntity_MultiFurnace extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Furnace").addInfo("Controller Block for the Multi Smelter")
- .addInfo("Smelts up to 8-8192 items at once").addInfo("Items smelted increases with coil tier")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front bottom").addCasingInfoRange("Heat Proof Machine Casing", 8, 14, false)
- .addOtherStructurePart("Heating Coils", "Middle layer").addEnergyHatch("Any bottom casing", 1)
- .addMaintenanceHatch("Any bottom casing", 1).addMufflerHatch("Top Middle", 2)
- .addInputBus("Any bottom casing", 1).addOutputBus("Any bottom casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Furnace")
+ .addInfo("Controller Block for the Multi Smelter")
+ .addInfo("Smelts up to 8-8192 items at once")
+ .addInfo("Items smelted increases with coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front bottom")
+ .addCasingInfoRange("Heat Proof Machine Casing", 8, 14, false)
+ .addOtherStructurePart("Heating Coils", "Middle layer")
+ .addEnergyHatch("Any bottom casing", 1)
+ .addMaintenanceHatch("Any bottom casing", 1)
+ .addMufflerHatch("Top Middle", 2)
+ .addInputBus("Any bottom casing", 1)
+ .addOutputBus("Any bottom casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -102,12 +133,25 @@ public class GT_MetaTileEntity_MultiFurnace extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide != aFacing) return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_MULTI_SMELTER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
@Override
@@ -214,7 +258,7 @@ public class GT_MetaTileEntity_MultiFurnace extends
if (tUsedMeta >= 12 && tUsedMeta <= 14
&& aBaseMetaTileEntity.getBlock(xPos, tY + 1, zPos) == GregTech_API.sBlockCasings1)
aBaseMetaTileEntity.getWorld()
- .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
+ .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
}
}
@@ -227,8 +271,10 @@ public class GT_MetaTileEntity_MultiFurnace extends
long storedEnergy = 0;
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
return new String[] {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
index 4a872e3833..4887c95930 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
@@ -51,9 +51,8 @@ public class GT_MetaTileEntity_NanoForge extends
private static final String STRUCTURE_PIECE_MAIN = "main";
private static final String STRUCTURE_PIECE_TIER2 = "tier2";
private static final String STRUCTURE_PIECE_TIER3 = "tier3";
- private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_NanoForge>builder()
- // spotless:off
+ private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_NanoForge>builder()
+ // spotless:off
.addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
{" "," "," F "," C "," C "," C "," C "," F "," "," "},
{" "," "," F "," C "," C "," C "," C "," F "," "," "},
@@ -141,15 +140,39 @@ public class GT_MetaTileEntity_NanoForge extends
{" CCCCCC ", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", " CCCCCC "}
}))
//spotless:on
- .addElement('F', ofFrame(Materials.StellarAlloy)).addElement('C', ofBlock(GregTech_API.sBlockCasings8, 10))
- .addElement('A', ofBlock(GregTech_API.sBlockCasings2, 5))
- .addElement(
- 'B',
- buildHatchAdder(GT_MetaTileEntity_NanoForge.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(10))
- .buildAndChain(GregTech_API.sBlockCasings8, 10))
- .build();
+ .addElement(
+ 'F',
+ ofFrame(
+ Materials.StellarAlloy))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .addElement(
+ 'A',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 5))
+ .addElement(
+ 'B',
+ buildHatchAdder(
+ GT_MetaTileEntity_NanoForge.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 10))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .build();
private byte mSpecialTier = 0;
public GT_MetaTileEntity_NanoForge(int aID, String aName, String aNameRegional) {
@@ -187,13 +210,26 @@ public class GT_MetaTileEntity_NanoForge extends
if (aSide == aFacing) {
if (aActive) return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) };
@@ -235,8 +271,15 @@ public class GT_MetaTileEntity_NanoForge extends
mOutputItems = null;
mOutputFluids = null;
long tTotalEU = getMaxInputEu();
- GT_Recipe tRecipe = map
- .findRecipe(getBaseMetaTileEntity(), null, false, false, tTotalEU, tFluidInputs, null, tItemInputs);
+ GT_Recipe tRecipe = map.findRecipe(
+ getBaseMetaTileEntity(),
+ null,
+ false,
+ false,
+ tTotalEU,
+ tFluidInputs,
+ null,
+ tItemInputs);
if (tRecipe == null) return false;
@@ -362,100 +405,112 @@ public class GT_MetaTileEntity_NanoForge extends
@Override
public IAlignmentLimits getAlignmentLimits() {
// The nano forge should only be buildable upright
- return IAlignmentLimits.Builder.allowAll().deny(ForgeDirection.DOWN).deny(ForgeDirection.UP)
- .deny(Rotation.UPSIDE_DOWN).deny(Rotation.CLOCKWISE).deny(Rotation.COUNTER_CLOCKWISE).build();
+ return IAlignmentLimits.Builder.allowAll()
+ .deny(ForgeDirection.DOWN)
+ .deny(ForgeDirection.UP)
+ .deny(Rotation.UPSIDE_DOWN)
+ .deny(Rotation.CLOCKWISE)
+ .deny(Rotation.COUNTER_CLOCKWISE)
+ .build();
}
@Override
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
super.drawTexts(screenElements, inventorySlot);
screenElements.widget(
- new TextWidget(StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> (int) mSpecialTier,
- val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
+ new TextWidget(
+ StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier).setDefaultColor(
+ COLOR_TEXT_WHITE.get())
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> (int) mSpecialTier,
+ val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Nanite Fabricator").addInfo("Controller block for the Nano Forge")
- .addInfo("Requires insane amounts of power to create nanites. Each tier")
- .addInfo("the multi gains a new building next to it. The nanite in the")
- .addInfo("controller slot controls the tier.").addInfo("--------------------------------------------")
- .addInfo("Requires a Carbon Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 1)
- .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2)
- .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3)
- .addInfo("--------------------------------------------")
- .addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
- .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
- .addInfo(AuthorBlueWeabo).addSeparator().beginStructureBlock(30, 38, 13, false)
- .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "527" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "171" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 2 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "148" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 3 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "228" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + "2"
- + EnumChatFormatting.GRAY
- + " energy hatches or "
- + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + " TT energy hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " input hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 0
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " output hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " input busses.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " output busses.")
- .addStructureInfo("--------------------------------------------").toolTipFinisher("GregTech");
+ tt.addMachineType("Nanite Fabricator")
+ .addInfo("Controller block for the Nano Forge")
+ .addInfo("Requires insane amounts of power to create nanites. Each tier")
+ .addInfo("the multi gains a new building next to it. The nanite in the")
+ .addInfo("controller slot controls the tier.")
+ .addInfo("--------------------------------------------")
+ .addInfo("Requires a Carbon Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 1)
+ .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2)
+ .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3)
+ .addInfo("--------------------------------------------")
+ .addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
+ .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
+ .addInfo(AuthorBlueWeabo)
+ .addSeparator()
+ .beginStructureBlock(30, 38, 13, false)
+ .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "527" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "171" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 2 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "148" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 3 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "228" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + "2"
+ + EnumChatFormatting.GRAY
+ + " energy hatches or "
+ + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + " TT energy hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " input hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 0
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " output hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " input busses.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " output busses.")
+ .addStructureInfo("--------------------------------------------")
+ .toolTipFinisher("GregTech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
index f2be5d276d..c35f387fd1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
@@ -42,52 +42,82 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
private static final byte CASING_INDEX = 49;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_OilCracker>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "lcmcr", "lcmcr", "lcmcr" }, { "lc~cr", "l---r", "lcmcr" },
- { "lcmcr", "lcmcr", "lcmcr" }, }))
- .addElement(
- 'c',
- ofCoil(GT_MetaTileEntity_OilCracker::setCoilLevel, GT_MetaTileEntity_OilCracker::getCoilLevel))
- .addElement(
- 'l',
- buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast(
- GT_HatchElement.InputHatch
- .withAdder(GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance).dot(2).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'r',
- buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast(
- GT_HatchElement.OutputHatch
- .withAdder(GT_MetaTileEntity_OilCracker::addRightHatchToMachineList),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance).dot(3).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'm',
- buildHatchAdder(
- GT_MetaTileEntity_OilCracker.class)
- .atLeast(
- GT_HatchElement.InputHatch
- .withAdder(
- GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList)
- .withCount(t -> t.mMiddleInputHatches.size()),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance)
- .dot(1).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_OilCracker>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "lcmcr",
+ "lcmcr",
+ "lcmcr" },
+ { "lc~cr",
+ "l---r",
+ "lcmcr" },
+ { "lcmcr",
+ "lcmcr",
+ "lcmcr" }, }))
+ .addElement(
+ 'c',
+ ofCoil(
+ GT_MetaTileEntity_OilCracker::setCoilLevel,
+ GT_MetaTileEntity_OilCracker::getCoilLevel))
+ .addElement(
+ 'l',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.InputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 2)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .addElement(
+ 'r',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.OutputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addRightHatchToMachineList),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 3)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .addElement(
+ 'm',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.InputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList)
+ .withCount(
+ t -> t.mMiddleInputHatches.size()),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 1)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .build();
private HeatingCoilLevel heatLevel;
protected final List<GT_MetaTileEntity_Hatch_Input> mMiddleInputHatches = new ArrayList<>();
// 0 -> left, 1 -> right, any other -> not found
@@ -106,23 +136,29 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Cracker").addInfo("Controller block for the Oil Cracking Unit")
- .addInfo("Thermally cracks heavy hydrocarbons into lighter fractions")
- .addInfo("More efficient than the Chemical Reactor")
- .addInfo("Gives different benefits whether it hydro or steam-cracks:")
- .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
- .addInfo("Steam - Outputs 50% more cracked fluid")
- .addInfo("(Values compared to cracking in the Chemical Reactor)")
- .addInfo("Place the appropriate circuit in the controller").addSeparator()
- .beginStructureBlock(5, 3, 3, true).addController("Front center")
- .addCasingInfoRange("Clean Stainless Steel Machine Casing", 18, 21, false)
- .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller")
- .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
- .addEnergyHatch("Any casing", 1, 2, 3).addMaintenanceHatch("Any casing", 1, 2, 3)
- .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1)
- .addInputHatch("Any left/right side casing", 2, 3).addOutputHatch("Any right/left side casing", 2, 3)
- .addStructureInfo("Input/Output Hatches must be on opposite sides!")
- .addStructureHint("GT5U.cracker.io_side").toolTipFinisher("Gregtech");
+ tt.addMachineType("Cracker")
+ .addInfo("Controller block for the Oil Cracking Unit")
+ .addInfo("Thermally cracks heavy hydrocarbons into lighter fractions")
+ .addInfo("More efficient than the Chemical Reactor")
+ .addInfo("Gives different benefits whether it hydro or steam-cracks:")
+ .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
+ .addInfo("Steam - Outputs 50% more cracked fluid")
+ .addInfo("(Values compared to cracking in the Chemical Reactor)")
+ .addInfo("Place the appropriate circuit in the controller")
+ .addSeparator()
+ .beginStructureBlock(5, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Clean Stainless Steel Machine Casing", 18, 21, false)
+ .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller")
+ .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
+ .addEnergyHatch("Any casing", 1, 2, 3)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1)
+ .addInputHatch("Any left/right side casing", 2, 3)
+ .addOutputHatch("Any right/left side casing", 2, 3)
+ .addStructureInfo("Input/Output Hatches must be on opposite sides!")
+ .addStructureHint("GT5U.cracker.io_side")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -130,13 +166,26 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_CRACKER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_CRACKER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -318,7 +367,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) continue;
aBaseMetaTileEntity.getWorld()
- .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
+ .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
index fa8619492f..f8eb8c7670 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
@@ -57,12 +57,26 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_DRILL_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_DRILL)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { getCasingTextureForId(casingTextureIndex) };
}
@@ -82,24 +96,28 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
}
protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Pump")
- .addInfo(
- "Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : ""))
- .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
- .addInfo("Use a Screwdriver to configure range")
- .addInfo("Use Programmed Circuits to ignore near exhausted oil field")
- .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.") // doesn't
- // work
- .addSeparator().beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
- .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech");
+ .addInfo("Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : ""))
+ .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
+ .addInfo("Use a Screwdriver to configure range")
+ .addInfo("Use Programmed Circuits to ignore near exhausted oil field")
+ .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.") // doesn't
+ // work
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
+ .addOutputHatch("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -202,7 +220,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (mOilFieldChunks.isEmpty()) {
Chunk tChunk = getBaseMetaTileEntity().getWorld()
- .getChunkFromBlockCoords(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
+ .getChunkFromBlockCoords(
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getZCoord());
int range = chunkRangeConfig;
int xChunk = Math.floorDiv(tChunk.xPosition, range) * range; // Java was written by idiots. For negative
// values, / returns rounded towards zero.
@@ -223,10 +243,13 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (debugDriller) {
GT_Log.out.println(" getChunkX = " + (xChunk + i) + " getChunkZ = " + (zChunk + j));
}
- tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i, zChunk + j);
+ tChunk = getBaseMetaTileEntity().getWorld()
+ .getChunkFromChunkCoords(xChunk + i, zChunk + j);
tFluid = undergroundOilReadInformation(tChunk);
if (debugDriller) {
- GT_Log.out.println(" Fluid in chunk = " + tFluid.getFluid().getID());
+ GT_Log.out.println(
+ " Fluid in chunk = " + tFluid.getFluid()
+ .getID());
}
if (tOil.isFluidEqual(tFluid) && tFluid.amount > 0) {
mOilFieldChunks.add(tChunk);
@@ -296,7 +319,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
+ " "
+ StatCollector.translateToLocal("GT5U.machines.chunks"),
"Drilling fluid: " + EnumChatFormatting.GREEN
- + (mOilId > 0 ? FluidRegistry.getFluid(mOilId).getName() : "None")
+ + (mOilId > 0 ? FluidRegistry.getFluid(mOilId)
+ .getName()
+ : "None")
+ EnumChatFormatting.RESET,
"Drilling flow: " + EnumChatFormatting.GREEN
+ GT_Utility.formatNumbers(
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
index e54fcbbd28..b92fcfae7f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
@@ -23,18 +23,24 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Pump").addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ")
- .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks").addSeparator()
- .beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
- .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Pump")
+ .addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ")
+ .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
+ .addOutputHatch("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
index 46b91ec2cf..c058c8880f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
@@ -142,7 +142,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
z = oreBlockPos.chunkPosZ;
if (GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), x, y, z, true))
oreBlock = getBaseMetaTileEntity().getBlock(x, y, z);
- oreBlockMetadata = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z);
+ oreBlockMetadata = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(x, y, z);
}
if (!tryConsumeDrillingFluid()) {
@@ -160,10 +161,19 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
ItemStack cobble = GT_Utility.getCobbleForOre(oreBlock, metaData);
if (replaceWithCobblestone) {
getBaseMetaTileEntity().getWorld()
- .setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), 3);
+ .setBlock(
+ x,
+ y,
+ z,
+ Block.getBlockFromItem(cobble.getItem()),
+ cobble.getItemDamage(),
+ 3);
} else {
getBaseMetaTileEntity().getWorld()
- .setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
+ .setBlockToAir(
+ oreBlockPos.chunkPosX,
+ oreBlockPos.chunkPosY,
+ oreBlockPos.chunkPosZ);
}
mOutputItems = getOutputByDrops(oreBlockDrops);
}
@@ -250,8 +260,9 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
return false;
}
mCurrentChunk = new ChunkCoordIntPair(nextChunkX, nextChunkZ);
- GT_ChunkManager
- .requestChunkLoad((TileEntity) getBaseMetaTileEntity(), new ChunkCoordIntPair(nextChunkX, nextChunkZ));
+ GT_ChunkManager.requestChunkLoad(
+ (TileEntity) getBaseMetaTileEntity(),
+ new ChunkCoordIntPair(nextChunkX, nextChunkZ));
return true;
}
@@ -286,8 +297,12 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
outputItems.add(multiplyStackSize(currentItem));
return;
}
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes
- .findRecipe(getBaseMetaTileEntity(), false, voltage, null, currentItem);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ voltage,
+ null,
+ currentItem);
if (tRecipe == null) {
outputItems.add(currentItem);
return;
@@ -380,26 +395,31 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
protected abstract int getBaseProgressTime();
protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Miner")
- .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""))
- .addInfo("Use a Screwdriver to configure block radius")
- .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks")
- .addInfo("Use Soldering iron to turn off chunk mode")
- .addInfo("Use Wire Cutter to toggle replacing mined blocks with cobblestone")
- .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill")
- .addInfo("Gives ~3x as much crushed ore vs normal processing")
- .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores").addSeparator()
- .beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes, optional, any base casing", 1)
- .addInputHatch("Drilling Fluid, any base casing", 1).addOutputBus("Any base casing", 1)
- .toolTipFinisher("Gregtech");
+ .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""))
+ .addInfo("Use a Screwdriver to configure block radius")
+ .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks")
+ .addInfo("Use Soldering iron to turn off chunk mode")
+ .addInfo("Use Wire Cutter to toggle replacing mined blocks with cobblestone")
+ .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill")
+ .addInfo("Gives ~3x as much crushed ore vs normal processing")
+ .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes, optional, any base casing", 1)
+ .addInputHatch("Drilling Fluid, any base casing", 1)
+ .addOutputBus("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
index df878d8050..7ad3c1b4bf 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
@@ -95,12 +95,12 @@ public class GT_MetaTileEntity_PCBFactory extends
private static final int mTier2BitMap = 0b10;
private static final int mTier1BitMap = 0b1;
private static final int COOLANT_CONSUMED_PER_SEC = 10;
- private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_PCBFactory>builder().addShape(
- tier1,
- transpose(
- new String[][] {
- // spotless:off
+ private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PCBFactory>builder()
+ .addShape(
+ tier1,
+ transpose(
+ new String[][] {
+ // spotless:off
{" ","E E","E E","EEEEEEE","E E","E E"," "},
{"EEEEEEE","CAAAAAC","CAAAAAC","CCCCCCC","CCCCCCC","CCCCCCC","E E"},
{"EAAAAAE","C-----C","C-----C","C-----C","C-----C","C-----C","ECCCCCE"},
@@ -108,11 +108,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"EAAAAAE","C-----C","B-FFF-B","B-FFF-B","B-FFF-B","C-----C","EPPPPPE"},
{"ECC~CCE","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","EPPPPPE"}
//spotless:on
- })).addShape(
- tier2,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ tier2,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," ","HGGH","HGGH","HGGH","HGGH","HGGH"," "," "," "},
{" "," ","HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"," "," "},
{" ","HGGH","GGGG","G G","G G","G G","G G","G G","GGGG","HGGH"," "},
@@ -121,11 +122,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"HGGH","G G","G G","G G","G G","G G","G G","G G","G G","G G","HGGH"},
{"HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"}
//spotless:on
- })).addShape(
- tier3,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ tier3,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," "," "," I "," I "," "," "," "," "},
{" "," "," "," I "," I "," I "," I "," "," "," "},
{" "," "," KKK "," KIK "," K K "," K K "," I "," "," "," "},
@@ -149,11 +151,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{" "," III "," I I "," I I "," I I "," I I "," I I "," I I "," III "," "},
{" II~II ","IIJJJII","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IIJJJII"," IIIII "}
//spotless:on
- })).addShape(
- bioUpgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ bioUpgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," LLLLLL "," "," "},
{" "," "," L L "," "," "},
{"E E E E"," LLL LLL "," LLL LLL "," LLL LLL ","E E E E"},
@@ -162,12 +165,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"EAAAE EAAAE","A A A A","A A A A","A A A A","EAAAE EAAAE"},
{"ELLLE ELLLE","LLLLL LLLLL","LLLLL LLLLL","LLLLL LLLLL","ELLLE ELLLE"}
//spotless:on
- }))
- .addShape(
- ocTier1Upgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ ocTier1Upgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{"EKKKE","K K","K K","K K","EKKKE"},
{"E E"," KKK "," K K "," KKK ","E E"},
{"E E"," NNN "," N N "," NNN ","E E"},
@@ -179,11 +182,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"ENNNE","NKKKN","NK KN","NKKKN","ENNNE"},
{"EGGGE","GGGGG","GGMGG","GGGGG","EGGGE"}
//spotless:on
- })).addShape(
- ocTier2Upgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ ocTier2Upgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{"RGGGR","G G","G G","G G","RGGGR"},
{"R R"," GGG "," GTG "," GGG ","R R"},
{"R R"," NNN "," NTN "," NNN ","R R"},
@@ -195,50 +199,172 @@ public class GT_MetaTileEntity_PCBFactory extends
{"RNNNR","NQQQN","NQTQN","NQQQN","RNNNR"},
{"RGGGR","GGGGG","GGSGG","GGGGG","RGGGR"}
//spotless:on
- })).addElement('E', ofFrame(Materials.DamascusSteel))
- .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 11))
- .addElement('D', ofBlock(GregTech_API.sBlockReinforced, 2))
- .addElement(
- 'A',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement('B', ofBlock(GregTech_API.sBlockCasings3, 10)).addElement('F', ofFrame(Materials.VibrantAlloy))
- .addElement(
- 'P',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11))
- .buildAndChain(GregTech_API.sBlockCasings8, 11))
- .addElement('H', ofFrame(Materials.Duranium)).addElement('G', ofBlock(GregTech_API.sBlockCasings8, 12))
- .addElement('I', ofBlock(GregTech_API.sBlockCasings8, 13))
- .addElement('K', ofBlock(GregTech_API.sBlockCasings8, 10))
- .addElement(
- 'J',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13))
- .buildAndChain(GregTech_API.sBlockCasings8, 13))
- .addElement('L', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'M',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
- .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2)
- .buildAndChain(GregTech_API.sBlockCasings8, 12))
- .addElement('N', ofBlock(GregTech_API.sBlockCasings2, 15))
- .addElement('O', ofBlock(GregTech_API.sBlockCasings8, 4))
- .addElement(
- 'S',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
- .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2)
- .buildAndChain(GregTech_API.sBlockCasings8, 12))
- .addElement('R', ofFrame(Materials.Americium)).addElement('Q', ofBlock(GregTech_API.sBlockCasings8, 14))
- .addElement('T', ofBlock(GregTech_API.sBlockCasings1, 15)).build();
+ }))
+ .addElement(
+ 'E',
+ ofFrame(
+ Materials.DamascusSteel))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 11))
+ .addElement(
+ 'D',
+ ofBlock(
+ GregTech_API.sBlockReinforced,
+ 2))
+ .addElement(
+ 'A',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'B',
+ ofBlock(
+ GregTech_API.sBlockCasings3,
+ 10))
+ .addElement(
+ 'F',
+ ofFrame(
+ Materials.VibrantAlloy))
+ .addElement(
+ 'P',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 11))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 11))
+ .addElement(
+ 'H',
+ ofFrame(
+ Materials.Duranium))
+ .addElement(
+ 'G',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'I',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 13))
+ .addElement(
+ 'K',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .addElement(
+ 'J',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 13))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 13))
+ .addElement(
+ 'L',
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'M',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).hatchClass(
+ GT_MetaTileEntity_Hatch_Input.class)
+ .adder(
+ GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
+ .casingIndex(
+ GT_Utility.getCasingTextureIndex(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'N',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 15))
+ .addElement(
+ 'O',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 4))
+ .addElement(
+ 'S',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).hatchClass(
+ GT_MetaTileEntity_Hatch_Input.class)
+ .adder(
+ GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
+ .casingIndex(
+ GT_Utility.getCasingTextureIndex(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'R',
+ ofFrame(
+ Materials.Americium))
+ .addElement(
+ 'Q',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 14))
+ .addElement(
+ 'T',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ 15))
+ .build();
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
@@ -374,15 +500,28 @@ public class GT_MetaTileEntity_PCBFactory extends
BlockIcons.getCasingTextureForId(
getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11)
: GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
return new ITexture[] {
BlockIcons.getCasingTextureForId(
getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11)
: GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { BlockIcons.getCasingTextureForId(
mSetTier < 3 ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11)
@@ -518,8 +657,15 @@ public class GT_MetaTileEntity_PCBFactory extends
long amps = getMaxInputAmps();
int tier = GT_Utility.getTier(voltage);
- GT_Recipe tRecipe = aMap
- .findRecipe(getBaseMetaTileEntity(), null, true, false, V[tier], aFluidInputs, aStack, aItemInputs);
+ GT_Recipe tRecipe = aMap.findRecipe(
+ getBaseMetaTileEntity(),
+ null,
+ true,
+ false,
+ V[tier],
+ aFluidInputs,
+ aStack,
+ aItemInputs);
if (tRecipe == null) {
return false;
@@ -552,9 +698,14 @@ public class GT_MetaTileEntity_PCBFactory extends
&& ((recipeBitMap & mBioBitMap) == 0 || ((recipeBitMap & mBioBitMap) == mBioBitMap && mBioUpgrade));
if (recipeAllowed) {
- GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs).setMaxParallel(aMaxParallel).setAvailableEUt(getMaxInputEu())
- .setEUtModifier(aExtraPower).enableConsumption().build();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe)
+ .setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs)
+ .setMaxParallel(aMaxParallel)
+ .setAvailableEUt(getMaxInputEu())
+ .setEUtModifier(aExtraPower)
+ .enableConsumption()
+ .build();
mCurrentParallel = helper.getCurrentParallel();
if (mCurrentParallel > 0) {
@@ -565,8 +716,14 @@ public class GT_MetaTileEntity_PCBFactory extends
if (mOCTier1 || mOCTier2) {
GT_OverclockCalculator calc = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
- .setDuration(tRecipe.mDuration).setEUt(voltage).setAmperage(amps)
- .setEUtDiscount(aExtraPower).setSpeedBoost((float) Math.pow(mRoughnessMultiplier, 2));
+ .setDuration(tRecipe.mDuration)
+ .setEUt(voltage)
+ .setAmperage(amps)
+ .setEUtDiscount(aExtraPower)
+ .setSpeedBoost(
+ (float) Math.pow(
+ mRoughnessMultiplier,
+ 2));
if (mOCTier2) {
calc.enablePerfectOC();
}
@@ -849,8 +1006,10 @@ public class GT_MetaTileEntity_PCBFactory extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch tHatch : getExoticAndNormalEnergyHatchList()) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
long voltage = getAverageInputVoltage();
@@ -919,120 +1078,110 @@ public class GT_MetaTileEntity_PCBFactory extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Circuit Board Fabricator").addInfo("Controller for the PCB Factory")
- .addInfo(
- EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD
- + "IMPORTANT!"
- + " Check the configuration menu before building.")
- .addInfo("Tier of the machine determines the available recipes.")
- .addInfo("Machine tier (1-3) is set in the controller GUI.")
- .addInfo("The configuration menu can be used to add upgrades.")
- .addInfo("Each tier and upgrade requires additional structures.")
- .addInfo("Power consumption is multiplied by Sqrt(structures).")
- .addInfo("Tier 2 and 3 allow parallel by using extra nanites.")
- .addInfo("Every doubling of nanites adds one parallel.")
- .addInfo("1x->1, 2x->2, 4x->3, 8x->4 with no limit.")
- .addInfo("Recipes require a cooling upgrade to be overclocked.")
- .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
- .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.")
- .addInfo("Trace size can be changed to modify the material usage and machine speed.")
- .addInfo(AuthorBlueWeabo).beginStructureBlock(30, 38, 13, false).addSeparator()
- .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
- .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addStructureInfo(
- "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "Center of the Liquid Cooling/Thermosink")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Base Multi (Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "77"
- + EnumChatFormatting.GRAY
- + " Basic Photolithography Framework Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 2
- + EnumChatFormatting.BLUE
- + " (Adds to Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "158"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 3
- + EnumChatFormatting.BLUE
- + ":")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "292"
- + EnumChatFormatting.GRAY
- + " Radiation Proof Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "68"
- + EnumChatFormatting.GRAY
- + " Clean Stainless Steel Machine Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "21"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Thermosink Radiator(Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 2
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "41"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Infinity Cooled Casing")
- .toolTipFinisher("GregTech");
+ tt.addMachineType("Circuit Board Fabricator")
+ .addInfo("Controller for the PCB Factory")
+ .addInfo(
+ EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD
+ + "IMPORTANT!"
+ + " Check the configuration menu before building.")
+ .addInfo("Tier of the machine determines the available recipes.")
+ .addInfo("Machine tier (1-3) is set in the controller GUI.")
+ .addInfo("The configuration menu can be used to add upgrades.")
+ .addInfo("Each tier and upgrade requires additional structures.")
+ .addInfo("Power consumption is multiplied by Sqrt(structures).")
+ .addInfo("Tier 2 and 3 allow parallel by using extra nanites.")
+ .addInfo("Every doubling of nanites adds one parallel.")
+ .addInfo("1x->1, 2x->2, 4x->3, 8x->4 with no limit.")
+ .addInfo("Recipes require a cooling upgrade to be overclocked.")
+ .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
+ .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.")
+ .addInfo("Trace size can be changed to modify the material usage and machine speed.")
+ .addInfo(AuthorBlueWeabo)
+ .beginStructureBlock(30, 38, 13, false)
+ .addSeparator()
+ .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
+ .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addStructureInfo(
+ "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "Center of the Liquid Cooling/Thermosink")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Base Multi (Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "77" + EnumChatFormatting.GRAY + " Basic Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 2
+ + EnumChatFormatting.BLUE
+ + " (Adds to Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "158"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 3
+ + EnumChatFormatting.BLUE
+ + ":")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "292"
+ + EnumChatFormatting.GRAY
+ + " Radiation Proof Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Clean Stainless Steel Machine Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "21"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Thermosink Radiator(Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 2
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "41"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block")
+ .addStructureInfo(EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Infinity Cooled Casing")
+ .toolTipFinisher("GregTech");
return tt;
}
@@ -1124,21 +1273,34 @@ public class GT_MetaTileEntity_PCBFactory extends
buildContext.addSyncedWindow(10, this::createConfigurationWindow);
builder.widget(
new ButtonWidget().setOnClick(
- (clickData, widget) -> { if (!widget.isClient()) widget.getContext().openSyncedWindow(10); })
- .setSize(16, 16).setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- ret.add(GT_UITextures.OVERLAY_BUTTON_CYCLIC);
- return ret.toArray(new IDrawable[0]);
- }).addTooltip("Configuration Menu").setPos(174, 130))
- .widget(
- new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center).setScale(0.91f)
- .setSize(20, 16).setPos(173, 98))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mSetTier).setSetterInt(val -> { mSetTier = val; })
- .setNumbers(1, 3).setTextColor(Color.WHITE.normal).setTextAlignment(Alignment.Center)
- .addTooltip("PCB Factory Tier").setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(18, 18).setPos(173, 110));
+ (clickData, widget) -> {
+ if (!widget.isClient()) widget.getContext()
+ .openSyncedWindow(10);
+ })
+ .setSize(16, 16)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ ret.add(GT_UITextures.OVERLAY_BUTTON_CYCLIC);
+ return ret.toArray(new IDrawable[0]);
+ })
+ .addTooltip("Configuration Menu")
+ .setPos(174, 130))
+ .widget(
+ new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center)
+ .setScale(0.91f)
+ .setSize(20, 16)
+ .setPos(173, 98))
+ .widget(
+ new TextFieldWidget().setGetterInt(() -> mSetTier)
+ .setSetterInt(val -> { mSetTier = val; })
+ .setNumbers(1, 3)
+ .setTextColor(Color.WHITE.normal)
+ .setTextAlignment(Alignment.Center)
+ .addTooltip("PCB Factory Tier")
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(18, 18)
+ .setPos(173, 110));
}
protected ModularWindow createConfigurationWindow(final EntityPlayer player) {
@@ -1146,192 +1308,364 @@ public class GT_MetaTileEntity_PCBFactory extends
builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT);
builder.setGuiTint(getGUIColorization());
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC).setPos(5, 5).setSize(16, 16))
- .widget(new TextWidget("Configuration Menu").setPos(25, 9))
- .widget(ButtonWidget.closeWindowButton(true).setPos(185, 3))
- .widget(
- new DynamicPositionedColumn().setSynced(false)
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mBioUpgrade, val -> {
- mBioUpgrade = val;
- if (!mBioUpgrade) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility
- .trans("339.1", "Biochamber Upgrade Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("339", "Biochamber Upgrade Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Biochamber").setTextAlignment(Alignment.Center)
- .setPos(23, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mBioRotate, val -> {
- mBioRotate = val;
- if (!mBioRotate) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility
- .trans("340.1", "Rotated biochamber disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("340", "Rotated biochamber enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18)
- .addTooltip("Rotates the biochamber by 90 degrees."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Bio Rotation")
- .setTextAlignment(Alignment.Center).setPos(23, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mOCTier1, val -> {
- mOCTier1 = val;
- if (!mOCTier1) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("341.1", "Tier 1 cooling disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("341", "Tier 1 cooling enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Liquid Cooling")
- .setTextAlignment(Alignment.Center).setPos(20, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mOCTier2, val -> {
- mOCTier2 = val;
- if (!mOCTier2) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("342.1", "Tier 2 cooling disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("342", "Tier 2 cooling enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Thermosink").setTextAlignment(Alignment.Center)
- .setPos(20, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Trace Size")).setSize(90, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()).setPos(0, 4))
- .widget(
- new TextFieldWidget()
- .setGetterInt(() -> (int) ((1f / mRoughnessMultiplier) * 100f))
- .setSetterInt(val -> { mRoughnessMultiplier = 100f / val; })
- .setNumbers(50, 200).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip(
- "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD).setSize(90, 16))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setSize(18, 18)
- .addTooltip(
- new Text("Can't change configuration when running !")
- .color(Color.RED.dark(3)))
- .setEnabled(widget -> getBaseMetaTileEntity().isActive()))
- .setPos(10, 25))
- .widget(
- new DynamicPositionedColumn().setSynced(false)
- .widget(
- new TextWidget(new Text("Bio Upgrade Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mBioOffsets[0])
- .setSetterInt(val -> { mBioOffsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mBioOffsets[1])
- .setSetterInt(val -> { mBioOffsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Cooler Tier 1 Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[0])
- .setSetterInt(val -> { mOCTier1Offsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[1])
- .setSetterInt(val -> { mOCTier1Offsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Cooler Tier 2 Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[0])
- .setSetterInt(val -> { mOCTier2Offsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[1])
- .setSetterInt(val -> { mOCTier2Offsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .setPos(110, 25));
+ new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setPos(5, 5)
+ .setSize(16, 16))
+ .widget(new TextWidget("Configuration Menu").setPos(25, 9))
+ .widget(
+ ButtonWidget.closeWindowButton(true)
+ .setPos(185, 3))
+ .widget(
+ new DynamicPositionedColumn().setSynced(false)
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mBioUpgrade,
+ val -> {
+ mBioUpgrade = val;
+ if (!mBioUpgrade) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "339.1",
+ "Biochamber Upgrade Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "339",
+ "Biochamber Upgrade Enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Biochamber").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 23,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mBioRotate,
+ val -> {
+ mBioRotate = val;
+ if (!mBioRotate) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "340.1",
+ "Rotated biochamber disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "340",
+ "Rotated biochamber enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Rotates the biochamber by 90 degrees."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Bio Rotation").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 23,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mOCTier1,
+ val -> {
+ mOCTier1 = val;
+ if (!mOCTier1) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "341.1",
+ "Tier 1 cooling disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "341",
+ "Tier 1 cooling enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Liquid Cooling").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 20,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mOCTier2,
+ val -> {
+ mOCTier2 = val;
+ if (!mOCTier2) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "342.1",
+ "Tier 2 cooling disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "342",
+ "Tier 2 cooling enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Thermosink").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 20,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(new Text("Trace Size")).setSize(90, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive())
+ .setPos(0, 4))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> (int) ((1f / mRoughnessMultiplier) * 100f))
+ .setSetterInt(
+ val -> {
+ mRoughnessMultiplier = 100f
+ / val;
+ })
+ .setNumbers(50, 200)
+ .setTextColor(Color.WHITE.normal)
+ .setTextAlignment(Alignment.Center)
+ .addTooltip(
+ "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(90, 16))
+ .widget(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CROSS)
+ .setSize(18, 18)
+ .addTooltip(
+ new Text(
+ "Can't change configuration when running !").color(
+ Color.RED.dark(
+ 3)))
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().isActive()))
+ .setPos(10, 25))
+ .widget(
+ new DynamicPositionedColumn().setSynced(false)
+ .widget(
+ new TextWidget(
+ new Text("Bio Upgrade Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mBioOffsets[0])
+ .setSetterInt(
+ val -> {
+ mBioOffsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mBioOffsets[1])
+ .setSetterInt(
+ val -> {
+ mBioOffsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(
+ new Text("Cooler Tier 1 Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier1Offsets[0])
+ .setSetterInt(
+ val -> {
+ mOCTier1Offsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier1Offsets[1])
+ .setSetterInt(
+ val -> {
+ mOCTier1Offsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(
+ new Text("Cooler Tier 2 Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier2Offsets[0])
+ .setSetterInt(
+ val -> {
+ mOCTier2Offsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier2Offsets[1])
+ .setSetterInt(
+ val -> {
+ mOCTier2Offsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .setPos(110, 25));
return builder.build();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
index d058bf1f42..25c3b7157e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
@@ -480,19 +480,44 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
private boolean isMultiChunkloaded = true;
protected static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_PlasmaForge>builder().addShape(STRUCTURE_PIECE_MAIN, structure_string)
- .addElement(
- 'C',
- ofCoil(GT_MetaTileEntity_PlasmaForge::setCoilLevel, GT_MetaTileEntity_PlasmaForge::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_PlasmaForge.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Energy, ExoticEnergy, Maintenance)
- .casingIndex(DIM_INJECTION_CASING).dot(3)
- .buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING))
- .addElement('N', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING))
- .addElement('s', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PlasmaForge>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ structure_string)
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_PlasmaForge::setCoilLevel,
+ GT_MetaTileEntity_PlasmaForge::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_PlasmaForge.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Energy,
+ ExoticEnergy,
+ Maintenance)
+ .casingIndex(
+ DIM_INJECTION_CASING)
+ .dot(
+ 3)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ DIM_INJECTION_CASING))
+ .addElement(
+ 'N',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_TRANS_CASING))
+ .addElement(
+ 's',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_BRIDGE_CASING))
+ .build();
@Override
protected boolean addBottomHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -517,87 +542,87 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addInfo("Transcending Dimensional Boundaries.")
- .addInfo(
- "Takes " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20))
- + EnumChatFormatting.GRAY
- + " hours of continuous run time to fully breach dimensional")
- .addInfo("boundaries and achieve maximum efficiency. This reduces fuel")
- .addInfo(
- "consumption by up to " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(100 * maximum_discount)
- + "%"
- + EnumChatFormatting.GRAY
- + ". Supports overclocking beyond MAX voltage.")
- .addInfo(AuthorColen).addSeparator().beginStructureBlock(33, 24, 33, false)
- .addStructureInfo("DTPF Structure is too complex! See schematic for details.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "120"
- + EnumChatFormatting.GRAY
- + " Dimensional bridge blocks required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "1,270"
- + EnumChatFormatting.GRAY
- + " Dimensional injection casings required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "2,121"
- + EnumChatFormatting.GRAY
- + " Dimensionally transcendent casings required.")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + "2"
- + EnumChatFormatting.GRAY
- + " energy hatches or "
- + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + " TT energy hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_input_hatch
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_hatch
- + EnumChatFormatting.GRAY
- + " input hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_output_hatch
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_output_hatch
- + EnumChatFormatting.GRAY
- + " output hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_input_bus
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_bus
- + EnumChatFormatting.GRAY
- + " input busses.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_output_bus
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_bus
- + EnumChatFormatting.GRAY
- + " output busses.")
- .addStructureInfo("--------------------------------------------").toolTipFinisher("Gregtech");
+ .addInfo(
+ "Takes " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20))
+ + EnumChatFormatting.GRAY
+ + " hours of continuous run time to fully breach dimensional")
+ .addInfo("boundaries and achieve maximum efficiency. This reduces fuel")
+ .addInfo(
+ "consumption by up to " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(100 * maximum_discount)
+ + "%"
+ + EnumChatFormatting.GRAY
+ + ". Supports overclocking beyond MAX voltage.")
+ .addInfo(AuthorColen)
+ .addSeparator()
+ .beginStructureBlock(33, 24, 33, false)
+ .addStructureInfo("DTPF Structure is too complex! See schematic for details.")
+ .addStructureInfo(EnumChatFormatting.GOLD + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "120" + EnumChatFormatting.GRAY + " Dimensional bridge blocks required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "1,270"
+ + EnumChatFormatting.GRAY
+ + " Dimensional injection casings required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "2,121"
+ + EnumChatFormatting.GRAY
+ + " Dimensionally transcendent casings required.")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + "2"
+ + EnumChatFormatting.GRAY
+ + " energy hatches or "
+ + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + " TT energy hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_input_hatch
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_hatch
+ + EnumChatFormatting.GRAY
+ + " input hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_output_hatch
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_output_hatch
+ + EnumChatFormatting.GRAY
+ + " output hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_input_bus
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_bus
+ + EnumChatFormatting.GRAY
+ + " input busses.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_output_bus
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_bus
+ + EnumChatFormatting.GRAY
+ + " output busses.")
+ .addStructureInfo("--------------------------------------------")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -611,11 +636,20 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_DTPF_ON)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], TextureFactory.builder()
+ .addIcon(OVERLAY_DTPF_OFF)
+ .extFacing()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING] };
}
@@ -658,8 +692,12 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
long tTotalEU = GT_ExoticEnergyInputHelper.getTotalEuMulti(getExoticAndNormalEnergyHatchList());
// Look up recipe. If not found it will return null.
- GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, tTotalEU, tFluids, tItems);
+ GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ tTotalEU,
+ tFluids,
+ tItems);
// Check if recipe found.
if (tRecipe_0 == null) return false;
@@ -808,8 +846,10 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
@@ -840,14 +880,14 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.formatNumbers(
- GT_ExoticEnergyInputHelper
- .getAverageInputVoltageMulti(getExoticAndNormalEnergyHatchList()))
+ GT_ExoticEnergyInputHelper.getAverageInputVoltageMulti(
+ getExoticAndNormalEnergyHatchList()))
+ EnumChatFormatting.RESET
+ " EU/t(*"
+ EnumChatFormatting.YELLOW
+ GT_Utility.formatNumbers(
- GT_ExoticEnergyInputHelper
- .getMaxWorkingInputAmpsMulti(getExoticAndNormalEnergyHatchList()))
+ GT_ExoticEnergyInputHelper.getMaxWorkingInputAmpsMulti(
+ getExoticAndNormalEnergyHatchList()))
+ EnumChatFormatting.RESET
+ "A) "
+ StatCollector.translateToLocal("GT5U.machines.tier")
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
index 67afa63df8..04811bb5d4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
@@ -52,16 +52,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
protected IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace> computeValue(Class<?> type) {
return IStructureDefinition.<GT_MetaTileEntity_PrimitiveBlastFurnace>builder()
- .addShape(
- "main",
- transpose(
- new String[][] { { "ccc", "c-c", "ccc" }, { "ccc", "clc", "ccc" },
- { "c~c", "clc", "ccc" }, { "ccc", "ccc", "ccc" }, }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID())))
- .addElement(
- 'l',
- ofChain(isAir(), ofBlockAnyMeta(Blocks.lava, 1), ofBlockAnyMeta(Blocks.flowing_lava, 1)))
- .build();
+ .addShape(
+ "main",
+ transpose(
+ new String[][] { { "ccc", "c-c", "ccc" },
+ { "ccc", "clc", "ccc" }, { "c~c", "clc", "ccc" },
+ { "ccc", "ccc", "ccc" }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID())))
+ .addElement(
+ 'l',
+ ofChain(
+ isAir(),
+ ofBlockAnyMeta(Blocks.lava, 1),
+ ofBlockAnyMeta(Blocks.flowing_lava, 1)))
+ .build();
}
};
@@ -155,7 +159,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover())
+ return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack())
+ .isSimpleCover())
&& (super.allowCoverOnSide(aSide, aCoverID));
}
@@ -201,7 +206,9 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void setExtendedFacing(ExtendedFacing alignment) {
- getBaseMetaTileEntity().setFrontFacing((byte) alignment.getDirection().ordinal());
+ getBaseMetaTileEntity().setFrontFacing(
+ (byte) alignment.getDirection()
+ .ordinal());
}
@Override
@@ -210,18 +217,19 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
private boolean checkMachine() {
- return STRUCTURE_DEFINITION.get(this.getClass()).check(
- this,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- !mMachine);
+ return STRUCTURE_DEFINITION.get(this.getClass())
+ .check(
+ this,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ !mMachine);
}
protected abstract Block getCasingBlock();
@@ -240,12 +248,15 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, 0.3D, 0D)
- .setIdentifier(ParticleFX.LARGE_SMOKE)
- .setPosition(
- lavaX + XSTR_INSTANCE.nextFloat(),
- aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1),
- lavaZ + XSTR_INSTANCE.nextFloat())
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.LARGE_SMOKE)
+ .setPosition(
+ lavaX + XSTR_INSTANCE.nextFloat(),
+ aBaseMetaTileEntity.getOffsetY(
+ aBaseMetaTileEntity.getBackFacing(),
+ 1),
+ lavaZ + XSTR_INSTANCE.nextFloat())
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
if (aBaseMetaTileEntity.isServerSide()) {
if (mUpdated) {
@@ -265,7 +276,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
this.mMaxProgresstime = 0;
GT_Mod.achievements.issueAchievement(
aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"steel");
}
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
@@ -282,22 +293,26 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
final short lavaY = aBaseMetaTileEntity.getYCoord();
if (aBaseMetaTileEntity.isActive()) {
if (aBaseMetaTileEntity.getAir(lavaX, lavaY, lavaZ)) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2);
this.mUpdate = 1;
}
if (aBaseMetaTileEntity.getAir(lavaX, lavaY + 1, lavaZ)) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2);
this.mUpdate = 1;
}
} else {
Block lowerLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY, lavaZ);
Block upperLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY + 1, lavaZ);
if (lowerLava == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2);
this.mUpdate = 1;
}
if (upperLava == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2);
this.mUpdate = 1;
}
}
@@ -349,9 +364,13 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
@@ -449,21 +468,22 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
if (mMachine) return -1;
- return STRUCTURE_DEFINITION.get(getClass()).survivalBuild(
- this,
- stackSize,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- elementBudget,
- env,
- false);
+ return STRUCTURE_DEFINITION.get(getClass())
+ .survivalBuild(
+ this,
+ stackSize,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ elementBudget,
+ env,
+ false);
}
@Override
@@ -473,19 +493,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- STRUCTURE_DEFINITION.get(getClass()).buildOrHints(
- this,
- stackSize,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- hintsOnly);
+ STRUCTURE_DEFINITION.get(getClass())
+ .buildOrHints(
+ this,
+ stackSize,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ hintsOnly);
}
@Override
@@ -496,39 +517,53 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new SlotWidget(inventoryHandler, 0).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())).setPos(33, 15))
- .widget(
- new SlotWidget(inventoryHandler, 1).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())).setPos(33, 33))
- .widget(
- new SlotWidget(inventoryHandler, 2).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(getSteamVariant())).setPos(33, 51))
- .widget(
- new SlotWidget(inventoryHandler, 3).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant()))
- .setPos(85, 24))
- .widget(
- new SlotWidget(inventoryHandler, 4).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()))
- .setPos(103, 24))
- .widget(
- new SlotWidget(inventoryHandler, 5).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()))
- .setPos(121, 24))
- .widget(
- new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20)
- .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
- .setNEITransferRect(getRecipeMap().mNEIName).setPos(58, 24).setSize(20, 18));
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 15))
+ .widget(
+ new SlotWidget(inventoryHandler, 1)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 33))
+ .widget(
+ new SlotWidget(inventoryHandler, 2)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 51))
+ .widget(
+ new SlotWidget(inventoryHandler, 3).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(
+ getSteamVariant()))
+ .setPos(85, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 4).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(103, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 5).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(121, 24))
+ .widget(
+ new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20)
+ .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
+ .setNEITransferRect(getRecipeMap().mNEIName)
+ .setPos(58, 24)
+ .setSize(20, 18));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index b988f1f7a5..d50b7debfa 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -86,18 +86,25 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Processing Array").addInfo("Runs supplied machines as if placed in the world")
- .addInfo("Place up to 64 singleblock GT machines into the controller")
- .addInfo("Note that you still need to supply power to them all")
- .addInfo("Use a screwdriver to enable separate input busses")
- .addInfo("Use a wire cutter to disable UEV+ downtiering")
- .addInfo("Doesn't work on certain machines, deal with it")
- .addInfo("Use it if you hate GT++, or want even more speed later on").addSeparator()
- .beginStructureBlock(3, 3, 3, true).addController("Front center")
- .addCasingInfoRange("Robust Tungstensteel Machine Casing", 14, 24, false)
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputBus("Any casing", 1)
- .addInputHatch("Any casing", 1).addOutputBus("Any casing", 1).addOutputHatch("Any casing", 1)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Processing Array")
+ .addInfo("Runs supplied machines as if placed in the world")
+ .addInfo("Place up to 64 singleblock GT machines into the controller")
+ .addInfo("Note that you still need to supply power to them all")
+ .addInfo("Use a screwdriver to enable separate input busses")
+ .addInfo("Use a wire cutter to disable UEV+ downtiering")
+ .addInfo("Doesn't work on certain machines, deal with it")
+ .addInfo("Use it if you hate GT++, or want even more speed later on")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Robust Tungstensteel Machine Casing", 14, 24, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -111,13 +118,26 @@ public class GT_MetaTileEntity_ProcessingArray
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][48] };
}
@@ -135,8 +155,10 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
public GT_Recipe_Map getRecipeMap() {
if (isCorrectMachinePart(mInventory[1])) {
- int length = mInventory[1].getUnlocalizedName().length();
- String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8);
+ int length = mInventory[1].getUnlocalizedName()
+ .length();
+ String aMachineName = mInventory[1].getUnlocalizedName()
+ .substring(17, length - 8);
return GT_ProcessingArray_Manager.giveRecipeMap(aMachineName);
}
return null;
@@ -144,7 +166,8 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
- return aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.");
+ return aStack != null && aStack.getUnlocalizedName()
+ .startsWith("gt.blockmachines.");
}
@Override
@@ -166,8 +189,10 @@ public class GT_MetaTileEntity_ProcessingArray
startRecipeProcessing();
boolean result = checkRecipe(mInventory[1]);
if (result) {
- int length = mInventory[1].getUnlocalizedName().length();
- String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8);
+ int length = mInventory[1].getUnlocalizedName()
+ .length();
+ String aMachineName = mInventory[1].getUnlocalizedName()
+ .substring(17, length - 8);
SoundResource sound = GT_ProcessingArray_Manager.getSoundResource(aMachineName);
if (sound != null) {
sendLoopStart((byte) sound.id);
@@ -265,7 +290,7 @@ public class GT_MetaTileEntity_ProcessingArray
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
tSingleRecipeCheckBuilder = GT_Single_Recipe_Check_Processing_Array.processingArrayBuilder(this)
- .setBefore(tInputs, tFluids);
+ .setBefore(tInputs, tFluids);
}
boolean recipeLocked = false;
@@ -277,8 +302,10 @@ public class GT_MetaTileEntity_ProcessingArray
break;
} else if (mLockedToSingleRecipe && !recipeLocked) {
// We want to lock to a single run of the recipe.
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids).setRecipe(tRecipe)
- .setRecipeAmperage(map.mAmperage).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids)
+ .setRecipe(tRecipe)
+ .setRecipeAmperage(map.mAmperage)
+ .build();
recipeLocked = true;
}
}
@@ -324,13 +351,15 @@ public class GT_MetaTileEntity_ProcessingArray
ItemStack[] tOut = new ItemStack[aRecipe.mOutputs.length];
for (int h = 0; h < aRecipe.mOutputs.length; h++) {
if (aRecipe.getOutput(h) != null) {
- tOut[h] = aRecipe.getOutput(h).copy();
+ tOut[h] = aRecipe.getOutput(h)
+ .copy();
tOut[h].stackSize = 0;
}
}
FluidStack[] tFOut = new FluidStack[aRecipe.mFluidOutputs.length];
for (int i = 0; i < aRecipe.mFluidOutputs.length; i++)
- if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i).copy();
+ if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i)
+ .copy();
for (int f = 0; f < tOut.length; f++) {
if (aRecipe.mOutputs[f] != null && tOut[f] != null) {
for (int g = 0; g < parallel * multiplier; g++) {
@@ -348,9 +377,11 @@ public class GT_MetaTileEntity_ProcessingArray
oNumber++;
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = Arrays.stream(tOut).filter(Objects::nonNull)
- .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack).filter(is -> is.stackSize > 0)
- .toArray(ItemStack[]::new);
+ this.mOutputItems = Arrays.stream(tOut)
+ .filter(Objects::nonNull)
+ .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack)
+ .filter(is -> is.stackSize > 0)
+ .toArray(ItemStack[]::new);
this.mOutputFluids = tFOut;
updateSlots();
return true;
@@ -473,8 +504,15 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
protected List<IHatchElement<? super GT_MetaTileEntity_CubicMultiBlockBase<?>>> getAllowedHatches() {
- return ImmutableList
- .of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, ExoticEnergy);
+ return ImmutableList.of(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Muffler,
+ Maintenance,
+ Energy,
+ ExoticEnergy);
}
@Override
@@ -494,8 +532,10 @@ public class GT_MetaTileEntity_ProcessingArray
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
@@ -536,8 +576,8 @@ public class GT_MetaTileEntity_ProcessingArray
+ ": "
+ EnumChatFormatting.YELLOW
+ VN[GT_Utility.getTier(
- GT_ExoticEnergyInputHelper
- .getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList()))]
+ GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(
+ getExoticAndNormalEnergyHatchList()))]
+ EnumChatFormatting.RESET,
StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ EnumChatFormatting.RED
@@ -649,19 +689,22 @@ public class GT_MetaTileEntity_ProcessingArray
super.addUIWidgets(builder, buildContext);
builder.widget(
- new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV).setPlayClickSound(true)
- .setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- if (downtierUEV) {
- ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_ON);
- } else {
- ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_OFF);
- }
- return ret.toArray(new IDrawable[0]);
- }).setPos(80, 91).setSize(16, 16)
- .addTooltip(StatCollector.translateToLocal("GT5U.gui.button.down_tier"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> downtierUEV, val -> downtierUEV = val));
+ new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV)
+ .setPlayClickSound(true)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ if (downtierUEV) {
+ ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_ON);
+ } else {
+ ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_OFF);
+ }
+ return ret.toArray(new IDrawable[0]);
+ })
+ .setPos(80, 91)
+ .setSize(16, 16)
+ .addTooltip(StatCollector.translateToLocal("GT5U.gui.button.down_tier"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> downtierUEV, val -> downtierUEV = val));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index a1e85f9b25..2644f9f49e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -54,31 +54,49 @@ public class GT_MetaTileEntity_PyrolyseOven extends
: ofBlock(GregTech_API.sBlockCasings1, 0);
return StructureDefinition.<GT_MetaTileEntity_PyrolyseOven>builder()
- .addShape(
- "main",
- transpose(
- new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" },
- { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
- { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
- { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, }))
- .addElement('c', onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))
- .addElement(
- 'C',
- ofCoil(
- GT_MetaTileEntity_PyrolyseOven::setCoilLevel,
- GT_MetaTileEntity_PyrolyseOven::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class)
- .atLeast(OutputBus, OutputHatch, Energy, Maintenance).casingIndex(CASING_INDEX).dot(1)
- .buildAndChain(
- onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)))
- .addElement(
- 't',
- buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class).atLeast(InputBus, InputHatch, Muffler)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)))
- .build();
+ .addShape(
+ "main",
+ transpose(
+ new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" },
+ { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
+ { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
+ { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, }))
+ .addElement(
+ 'c',
+ onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_PyrolyseOven::setCoilLevel,
+ GT_MetaTileEntity_PyrolyseOven::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_PyrolyseOven.class).atLeast(
+ OutputBus,
+ OutputHatch,
+ Energy,
+ Maintenance)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_PyrolyseOven::onCasingAdded,
+ tCasingElement)))
+ .addElement(
+ 't',
+ buildHatchAdder(
+ GT_MetaTileEntity_PyrolyseOven.class).atLeast(
+ InputBus,
+ InputHatch,
+ Muffler)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_PyrolyseOven::onCasingAdded,
+ tCasingElement)))
+ .build();
}
private int mCasingAmount;
@@ -94,17 +112,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Coke Oven").addInfo("Controller block for the Pyrolyse Oven")
- .addInfo("Industrial Charcoal producer").addInfo("Processing speed scales linearly with Coil tier:")
- .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, TPV: 200%, etc.")
- .addInfo("EU/t is not affected by Coil tier").addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator().beginStructureBlock(5, 4, 5, true).addController("Front center")
- .addCasingInfoRange("Pyrolyse Oven Casing", 60, 80, false)
- .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer")
- .addEnergyHatch("Any bottom layer casing", 1).addMaintenanceHatch("Any bottom layer casing", 1)
- .addMufflerHatch("Center 3x1x3 area in top layer", 2).addInputBus("Center 3x1x3 area in top layer", 2)
- .addInputHatch("Center 3x1x3 area in top layer", 2).addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("Any bottom layer casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Coke Oven")
+ .addInfo("Controller block for the Pyrolyse Oven")
+ .addInfo("Industrial Charcoal producer")
+ .addInfo("Processing speed scales linearly with Coil tier:")
+ .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, TPV: 200%, etc.")
+ .addInfo("EU/t is not affected by Coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(5, 4, 5, true)
+ .addController("Front center")
+ .addCasingInfoRange("Pyrolyse Oven Casing", 60, 80, false)
+ .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer")
+ .addEnergyHatch("Any bottom layer casing", 1)
+ .addMaintenanceHatch("Any bottom layer casing", 1)
+ .addMufflerHatch("Center 3x1x3 area in top layer", 2)
+ .addInputBus("Center 3x1x3 area in top layer", 2)
+ .addInputHatch("Center 3x1x3 area in top layer", 2)
+ .addOutputBus("Any bottom layer casing", 1)
+ .addOutputHatch("Any bottom layer casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -112,13 +139,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[8][66],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[8][66],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[8][66], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[8][66], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PYROLYSE_OVEN)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[8][66] };
}
@@ -155,7 +195,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends
if (mLockedToSingleRecipe) {
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
- tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore();
+ tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this)
+ .setBefore();
}
tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(
@@ -168,7 +209,9 @@ public class GT_MetaTileEntity_PyrolyseOven extends
if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) return false;
if (mLockedToSingleRecipe) {
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter()
+ .setRecipe(tRecipe)
+ .build();
}
}
@@ -253,7 +296,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends
for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) {
if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1
&& aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) {
- aBaseMetaTileEntity.getWorld().setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3);
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
index 16c417e8de..e60e999e0c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
@@ -43,15 +43,36 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
{ " CAC ", " ABA ", " ABA ", " ABA ", " ABA ", " ABA ", " CAC " } };
private static final String STRUCTURE_PIECE_MAIN = "MAIN";
- private static final IStructureDefinition<GT_MetaTileEntity_TranscendentPlasmaMixer> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_TranscendentPlasmaMixer>builder().addShape(STRUCTURE_PIECE_MAIN, structure)
- .addElement(
- 'B',
- buildHatchAdder(GT_MetaTileEntity_TranscendentPlasmaMixer.class)
- .atLeast(InputHatch, OutputHatch, InputBus, Maintenance).casingIndex(DIM_INJECTION_CASING)
- .dot(1).buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING))
- .addElement('A', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING))
- .addElement('C', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_TranscendentPlasmaMixer> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_TranscendentPlasmaMixer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ structure)
+ .addElement(
+ 'B',
+ buildHatchAdder(
+ GT_MetaTileEntity_TranscendentPlasmaMixer.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ Maintenance)
+ .casingIndex(
+ DIM_INJECTION_CASING)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ DIM_INJECTION_CASING))
+ .addElement(
+ 'A',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_TRANS_CASING))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_BRIDGE_CASING))
+ .build();
private String ownerUUID;
@@ -71,15 +92,20 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Transcendent Mixer").addInfo("Assisting in all your DTPF needs.")
- .addInfo("This multiblock will run in parallel according to the circuit provided to the")
- .addInfo("controller slot. E.g. 3x Circuit #16 = 48x parallel. All inputs will scale,")
- .addInfo("except time. All EU is deducted from wireless EU networks only.").addInfo(AuthorColen)
- .addInfo("Controller slot and circuit slot are separate.").addSeparator()
- .beginStructureBlock(5, 7, 5, false).addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch")
- .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch")
- .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus")
- .addStructureInfo(GOLD + "1 " + GRAY + "Maintenance Hatch").toolTipFinisher("Gregtech");
+ tt.addMachineType("Transcendent Mixer")
+ .addInfo("Assisting in all your DTPF needs.")
+ .addInfo("This multiblock will run in parallel according to the circuit provided to the")
+ .addInfo("controller slot. E.g. 3x Circuit #16 = 48x parallel. All inputs will scale,")
+ .addInfo("except time. All EU is deducted from wireless EU networks only.")
+ .addInfo(AuthorColen)
+ .addInfo("Controller slot and circuit slot are separate.")
+ .addSeparator()
+ .beginStructureBlock(5, 7, 5, false)
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch")
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch")
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus")
+ .addStructureInfo(GOLD + "1 " + GRAY + "Maintenance Hatch")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -92,11 +118,20 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_DTPF_ON)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING], TextureFactory.builder()
+ .addIcon(OVERLAY_DTPF_OFF)
+ .extFacing()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING] };
@@ -121,8 +156,12 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
boolean processRecipe(ItemStack[] items, FluidStack[] fluids) {
- GT_Recipe originalRecipe = GT_Recipe.GT_Recipe_Map.sTranscendentPlasmaMixerRecipes
- .findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, fluids, items);
+ GT_Recipe originalRecipe = GT_Recipe.GT_Recipe_Map.sTranscendentPlasmaMixerRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ Long.MAX_VALUE,
+ fluids,
+ items);
if (originalRecipe == null) {
return false;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
index 463e00f7cd..eabdd8ee35 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
@@ -41,12 +41,20 @@ public class GT_MetaTileEntity_VacuumFreezer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Vacuum Freezer").addInfo("Controller Block for the Vacuum Freezer")
- .addInfo("Cools hot ingots and cells").addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front center").addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputHatch("Any casing", 1)
- .addOutputHatch("Any casing", 1).addInputBus("Any casing", 1).addOutputBus("Any casing", 1)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Vacuum Freezer")
+ .addInfo("Controller Block for the Vacuum Freezer")
+ .addInfo("Cools hot ingots and cells")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -56,15 +64,27 @@ public class GT_MetaTileEntity_VacuumFreezer
ITexture[] rTexture;
if (aSide == aFacing) {
if (aActive) {
- rTexture = new ITexture[] { casingTexturePages[0][17],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
} else {
- rTexture = new ITexture[] { casingTexturePages[0][17],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).extFacing().glow()
- .build() };
+ rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_VACUUM_FREEZER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
} else {
rTexture = new ITexture[] { casingTexturePages[0][17] };
diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java
index b69909d9fb..4114ee5564 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java
@@ -78,9 +78,12 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Coke Oven").addInfo("Used for charcoal").beginStructureBlock(3, 3, 3, true)
- .addCasingInfoExactly("Coke Oven Bricks", 25, false)
- .addPollutionAmount(POLLUTION_LOGIC.getPollutionAmount()).toolTipFinisher(GT_Values.AuthorBlueWeabo);
+ tt.addMachineType("Coke Oven")
+ .addInfo("Used for charcoal")
+ .beginStructureBlock(3, 3, 3, true)
+ .addCasingInfoExactly("Coke Oven Bricks", 25, false)
+ .addPollutionAmount(POLLUTION_LOGIC.getPollutionAmount())
+ .toolTipFinisher(GT_Values.AuthorBlueWeabo);
return tt;
}
@@ -92,13 +95,19 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
@Override
public IStructureDefinition<MultiBlock_CokeOven> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_CokeOven>builder().addShape(
- MAIN,
- new String[][] { { "AAA", "A~A", "AAA" }, { "AAA", "A-A", "AAA" }, { "AAA", "AAA", "AAA" } })
- .addElement(
- 'A',
- addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), ITEM_IN | ITEM_OUT))
- .build();
+ STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_CokeOven>builder()
+ .addShape(
+ MAIN,
+ new String[][] { { "AAA", "A~A", "AAA" },
+ { "AAA", "A-A", "AAA" },
+ { "AAA", "AAA", "AAA" } })
+ .addElement(
+ 'A',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ ITEM_IN | ITEM_OUT))
+ .build();
}
return STRUCTURE_DEFINITION;
}
@@ -110,8 +119,12 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inputInventory, 0).setPos(18, 18).setSize(18, 18));
- builder.widget(new SlotWidget(outputInventory, 0).setPos(36, 36).setSize(18, 18));
+ builder.widget(
+ new SlotWidget(inputInventory, 0).setPos(18, 18)
+ .setSize(18, 18));
+ builder.widget(
+ new SlotWidget(outputInventory, 0).setPos(36, 36)
+ .setSize(18, 18));
builder.widget(createButtons());
}
@@ -123,8 +136,9 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
if (NetworkUtils.isClient()) {
final FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
// noinspection unchecked
- final List<String> titleLines = fontRenderer
- .listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2);
+ final List<String> titleLines = fontRenderer.listFormattedStringToWidth(
+ title,
+ getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2);
titleWidth = titleLines.size() > 1 ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2
: fontRenderer.getStringWidth(title);
// noinspection PointlessArithmeticExpression
@@ -133,17 +147,21 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
final DrawableWidget tab = new DrawableWidget();
final TextWidget text = new TextWidget(title).setDefaultColor(getTitleColor())
- .setTextAlignment(Alignment.CenterLeft).setMaxWidth(titleWidth);
+ .setTextAlignment(Alignment.CenterLeft)
+ .setMaxWidth(titleWidth);
if (GT_Mod.gregtechproxy.mTitleTabStyle == 1) {
- tab.setDrawable(getGUITextureSet().getTitleTabAngular()).setPos(0, -(titleHeight + TAB_PADDING) + 1)
- .setSize(getGUIWidth(), titleHeight + TAB_PADDING * 2);
+ tab.setDrawable(getGUITextureSet().getTitleTabAngular())
+ .setPos(0, -(titleHeight + TAB_PADDING) + 1)
+ .setSize(getGUIWidth(), titleHeight + TAB_PADDING * 2);
text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight + TAB_PADDING);
} else {
- tab.setDrawable(getGUITextureSet().getTitleTabDark()).setPos(0, -(titleHeight + TAB_PADDING * 2) + 1)
- .setSize(titleWidth + (TAB_PADDING + TITLE_PADDING) * 2, titleHeight + TAB_PADDING * 2 - 1);
+ tab.setDrawable(getGUITextureSet().getTitleTabDark())
+ .setPos(0, -(titleHeight + TAB_PADDING * 2) + 1)
+ .setSize(titleWidth + (TAB_PADDING + TITLE_PADDING) * 2, titleHeight + TAB_PADDING * 2 - 1);
text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight);
}
- builder.widget(tab).widget(text);
+ builder.widget(tab)
+ .widget(text);
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java
index 3c0619e667..acd611ab12 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java
@@ -50,33 +50,67 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
public IStructureDefinition<MultiBlock_Macerator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_Macerator>builder()
- .addShape(
- STACKABLE_TOP,
- transpose(new String[][] { { " CCC ", "CCCCC", "CCCCC", "CCCCC", " CCC " }, }))
- .addShape(
- STACKABLE_MIDDLE,
- transpose(new String[][] { { " BBB ", " B---B ", "DC---CD", " B---B ", " BBB " }, }))
- .addShape(
- STACKABLE_BOTTOM,
- transpose(new String[][] { { " G~F ", "AAAAA", "AAAAA", "AAAAA", " AAA " }, }))
- .addElement(
- 'A',
- ofChain(addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), ENERGY_IN)))
- .addElement(
- 'B',
- ofChain(
- addMultiTileCasing(
- "gt.multitileentity.casings",
- getCasingMeta(),
- FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT)))
- .addElement('C', addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), NOTHING))
- .addElement('D', addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), NOTHING))
- .addElement(
- 'F',
- ofChain(
- addMultiTileCasing("gt.multitileentity.casings", 20001, NOTHING),
- addMultiTileCasing("gt.multitileentity.casings", 20002, NOTHING)))
- .addElement('G', addMultiTileCasing("gt.multitileentity.casings", 10000, NOTHING)).build();
+ .addShape(
+ STACKABLE_TOP,
+ transpose(
+ new String[][] { { " CCC ", "CCCCC", "CCCCC",
+ "CCCCC", " CCC " }, }))
+ .addShape(
+ STACKABLE_MIDDLE,
+ transpose(
+ new String[][] { { " BBB ", " B---B ",
+ "DC---CD", " B---B ", " BBB " }, }))
+ .addShape(
+ STACKABLE_BOTTOM,
+ transpose(
+ new String[][] { { " G~F ", "AAAAA", "AAAAA",
+ "AAAAA", " AAA " }, }))
+ .addElement(
+ 'A',
+ ofChain(
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ ENERGY_IN)))
+ .addElement(
+ 'B',
+ ofChain(
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ FLUID_IN | ITEM_IN
+ | FLUID_OUT
+ | ITEM_OUT)))
+ .addElement(
+ 'C',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ NOTHING))
+ .addElement(
+ 'D',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ NOTHING))
+ .addElement(
+ 'F',
+ ofChain(
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ 20001,
+ NOTHING),
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ 20002,
+ NOTHING)))
+ .addElement(
+ 'G',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ 10000,
+ NOTHING))
+ .build();
}
return STRUCTURE_DEFINITION;
}
@@ -99,17 +133,20 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Macerator").addInfo("Controller for the Macerator").addSeparator()
- .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true)
- .addController("Bottom Front Center").addCasingInfoExactly("Test Casing", 60, false)
- .addEnergyHatch("Any bottom layer casing")
- .addInputHatch("Any non-optional external facing casing on the stacks")
- .addInputBus("Any non-optional external facing casing on the stacks")
- .addOutputHatch("Any non-optional external facing casing on the stacks")
- .addOutputBus("Any non-optional external facing casing on the stacks")
- .addStructureInfo(
- String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks()))
- .toolTipFinisher("Wildcard");
+ tt.addMachineType("Macerator")
+ .addInfo("Controller for the Macerator")
+ .addSeparator()
+ .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true)
+ .addController("Bottom Front Center")
+ .addCasingInfoExactly("Test Casing", 60, false)
+ .addEnergyHatch("Any bottom layer casing")
+ .addInputHatch("Any non-optional external facing casing on the stacks")
+ .addInputBus("Any non-optional external facing casing on the stacks")
+ .addOutputHatch("Any non-optional external facing casing on the stacks")
+ .addOutputBus("Any non-optional external facing casing on the stacks")
+ .addStructureInfo(
+ String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks()))
+ .toolTipFinisher("Wildcard");
return tt;
}
@@ -151,17 +188,25 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
// Base Texture
MACHINE_CASINGS[1][0],
// Active
- isActive()
- ? TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing()
- .build()
- : TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing()
- .build(),
+ isActive() ? TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
+ .extFacing()
+ .build()
+ : TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
+ .extFacing()
+ .build(),
// Active Glow
- isActive()
- ? TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
- .extFacing().glow().build()
- : TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing()
- .glow().build() };
+ isActive() ? TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build()
+ : TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
// Base Texture
return new ITexture[] { MACHINE_CASINGS[1][0] };
@@ -177,7 +222,8 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
}
return false;
} else {
- ItemStack[] tItemInputs = getInventoriesForInput().getStacks().toArray(new ItemStack[0]);
+ ItemStack[] tItemInputs = getInventoriesForInput().getStacks()
+ .toArray(new ItemStack[0]);
return processRecipe(tItemInputs, null);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
index 4f9677eda6..bfbe56a665 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
@@ -55,57 +55,81 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] { super.getTopFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
index ca08d647a1..c84e6a05d5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
@@ -55,57 +55,81 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] { super.getTopFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
index 3f7eed2c99..26a8e1056c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
@@ -50,56 +50,80 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
index 3f6e318284..060826b966 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
@@ -50,56 +50,80 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
index d9597663da..1f03faca48 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
@@ -50,55 +50,79 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
index f90e0044bd..83f2899259 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
@@ -50,55 +50,79 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
index 3f25499dd8..d648c6a41d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
@@ -58,54 +58,77 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
/**
@@ -159,8 +182,11 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.LAVA).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.LAVA)
+ .run();
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
index acfd8e6b28..22292c814b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
@@ -58,54 +58,77 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
/**
@@ -159,8 +182,11 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.LAVA).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.LAVA)
+ .run();
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
index e102d797e8..deb0d6c2d8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
@@ -75,48 +75,69 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -124,6 +145,9 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac
return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW)
+ .glow()
+ .build()) };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
index 8d0414103e..285e85943f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
@@ -75,54 +75,78 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
index def8af9fe3..936b75bc8c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
@@ -50,12 +50,17 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
&& aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0
&& !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) {
- new ParticleEventBuilder().setMotion(0.0D, 0.0D, 0.0D).setIdentifier(ParticleFX.SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F,
- aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F,
- aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F)
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ new ParticleEventBuilder().setMotion(0.0D, 0.0D, 0.0D)
+ .setIdentifier(ParticleFX.SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getXCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F,
+ aBaseMetaTileEntity.getYCoord() + 0.9F
+ + XSTR_INSTANCE.nextFloat() * 0.2F,
+ aBaseMetaTileEntity.getZCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
@@ -67,8 +72,14 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
@Override
public int checkRecipe() {
- GT_Recipe tRecipe = getRecipeList()
- .findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs());
+ GT_Recipe tRecipe = getRecipeList().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ V[mTier],
+ null,
+ null,
+ getAllInputs());
if (tRecipe == null) return DID_NOT_FIND_RECIPE;
if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
if (!canOutput(tRecipe)) {
@@ -105,55 +116,79 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
index 81027ca069..64b44a5510 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
@@ -51,12 +51,16 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
&& !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0.0D, 0.0D, 0.0D)
- .setIdentifier(ParticleFX.SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F,
- aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F,
- aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F)
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getXCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F,
+ aBaseMetaTileEntity.getYCoord() + 0.9F
+ + XSTR_INSTANCE.nextFloat() * 0.2F,
+ aBaseMetaTileEntity.getZCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
@@ -68,8 +72,14 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
@Override
public int checkRecipe() {
- GT_Recipe tRecipe = getRecipeList()
- .findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs());
+ GT_Recipe tRecipe = getRecipeList().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ V[mTier],
+ null,
+ null,
+ getAllInputs());
if (tRecipe == null) return DID_NOT_FIND_RECIPE;
if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
if (!canOutput(tRecipe)) {
@@ -106,55 +116,79 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
index ce434bc371..cee78c3fa4 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
@@ -95,8 +95,10 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
}
public static void registerAEIntegration() {
- appeng.api.AEApi.instance().registries().externalStorage()
- .addExternalStorageInterface(new AE2DigitalChestHandler());
+ appeng.api.AEApi.instance()
+ .registries()
+ .externalStorage()
+ .addExternalStorageInterface(new AE2DigitalChestHandler());
}
@Override
@@ -417,8 +419,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
private boolean hasActiveMEConnection() {
if (listeners == null || listeners.isEmpty()) return false;
- for (Map.Entry<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> e : listeners
- .entrySet()) {
+ for (Map.Entry<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> e : listeners.entrySet()) {
if ((e.getKey() instanceof appeng.api.parts.IPart)) {
appeng.api.networking.IGridNode n = ((appeng.api.parts.IPart) e.getKey()).getGridNode();
if (n != null && n.isActive()) return true;
@@ -467,7 +468,10 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
boolean aActive, boolean aRedstone) {
if (aSide != aFacing) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_SCHEST),
- TextureFactory.builder().addIcon(OVERLAY_SCHEST_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SCHEST_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -478,7 +482,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
if (tag.hasKey("itemType", Constants.NBT.TAG_COMPOUND)) {
currenttip.add("Item Count: " + GT_Utility.parseNumberToString(tag.getInteger("itemCount")));
currenttip.add(
- "Item Type: " + ItemStack.loadItemStackFromNBT(tag.getCompoundTag("itemType")).getDisplayName());
+ "Item Type: " + ItemStack.loadItemStackFromNBT(tag.getCompoundTag("itemType"))
+ .getDisplayName());
} else {
currenttip.add("Chest Empty");
}
@@ -505,26 +510,36 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
- .widget(
- new SlotWidget(inventoryHandler, 0)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(
- new SlotWidget(inventoryHandler, 1).setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(79, 52))
- .widget(
- SlotWidget.phantom(inventoryHandler, 2).disableInteraction()
- .setBackground(GT_UITextures.TRANSPARENT).setPos(59, 42))
- .widget(
- new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20))
- .widget(
- TextWidget.dynamicString(
- () -> GT_Utility.parseNumberToString(
- this instanceof GT_MetaTileEntity_QuantumChest
- ? ((GT_MetaTileEntity_QuantumChest) this).mItemCount
- : 0))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setPos(7, 16)
+ .setSize(71, 45))
+ .widget(
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(79, 16))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_OUT)
+ .setPos(79, 52))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 2)
+ .disableInteraction()
+ .setBackground(GT_UITextures.TRANSPARENT)
+ .setPos(59, 42))
+ .widget(
+ new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 20))
+ .widget(
+ TextWidget.dynamicString(
+ () -> GT_Utility.parseNumberToString(
+ this instanceof GT_MetaTileEntity_QuantumChest
+ ? ((GT_MetaTileEntity_QuantumChest) this).mItemCount
+ : 0))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 30));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
index 9a4727941f..e374658871 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
@@ -171,7 +171,10 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
- return !mLockFluid || lockedFluidName == null || lockedFluidName.equals(aFluid.getFluid().getName());
+ return !mLockFluid || lockedFluidName == null
+ || lockedFluidName.equals(
+ aFluid.getFluid()
+ .getName());
}
@Override
@@ -182,7 +185,8 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public void onEmptyingContainerWhenEmpty() {
if (this.lockedFluidName == null && this.mFluid != null) {
- this.lockedFluidName = this.mFluid.getFluid().getName();
+ this.lockedFluidName = this.mFluid.getFluid()
+ .getName();
}
}
@@ -266,7 +270,10 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
} else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
}
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_QTANK),
- TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_QTANK_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -343,8 +350,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
getOutputSlot(),
GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true),
1)) {
- getFillableStack().amount += Math
- .min(tFluid.amount, getRealCapacity() - getFillableStack().amount);
+ getFillableStack().amount += Math.min(
+ tFluid.amount,
+ getRealCapacity() - getFillableStack().amount);
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
}
}
@@ -354,8 +362,11 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
}
if (doesFillContainers()) {
- ItemStack tOutput = GT_Utility
- .fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true);
+ ItemStack tOutput = GT_Utility.fillFluidContainer(
+ getDrainableStack(),
+ mInventory[getInputSlot()],
+ false,
+ true);
if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) {
FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true);
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
@@ -368,10 +379,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public int fill(FluidStack aFluid, boolean doFill) {
- if (aFluid == null || aFluid.getFluid().getID() <= 0
- || aFluid.amount <= 0
- || !canTankBeFilled()
- || !isFluidInputAllowed(aFluid))
+ if (aFluid == null || aFluid.getFluid()
+ .getID()
+ <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid))
return 0;
if (getFillableStack() != null && !getFillableStack().isFluidEqual(aFluid)) {
return 0;
@@ -483,8 +493,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
FluidStack fluid = tag.hasKey("mFluid") ? FluidStack.loadFluidStackFromNBT(tag.getCompoundTag("mFluid")) : null;
if (fluid != null && fluid.amount > 0) {
currenttip.remove(0);
- currenttip
- .add(0, String.format("%d / %d mB %s", fluid.amount, getRealCapacity(), fluid.getLocalizedName()));
+ currenttip.add(
+ 0,
+ String.format("%d / %d mB %s", fluid.amount, getRealCapacity(), fluid.getLocalizedName()));
} else {
currenttip.add(0, "Tank Empty");
}
@@ -507,116 +518,161 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
- .widget(
- new SlotWidget(inventoryHandler, getInputSlot())
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(
- new SlotWidget(inventoryHandler, getOutputSlot()).setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(79, 43))
- .widget(
- new FluidDisplaySlotWidget(inventoryHandler, getStackDisplaySlot())
- .setFluidAccessConstructor(() -> constructFluidAccess(false)).setIHasFluidDisplay(this)
- .setCanDrain(true).setCanFill(!isDrainableStackSeparate())
- .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER)
- .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK)
- .setBeforeRealClick((clickData, widget) -> {
- if (NetworkUtils.isClient()) {
- // propagate display item content to actual fluid stored in this tank
- setDrainableStack(
- GT_Utility.getFluidFromDisplayStack(widget.getMcSlot().getStack()));
- }
- return true;
- }).setBackground(GT_UITextures.TRANSPARENT).setPos(58, 41))
- .widget(new TextWidget("Liquid Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20))
- .widget(
- TextWidget
- .dynamicString(() -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30))
- .widget(new CycleButtonWidget().setToggle(() -> mOutputFluid, val -> {
- mOutputFluid = val;
- if (!mOutputFluid) {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("262", "Fluid Auto Output Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("263", "Fluid Auto Output Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.autooutput.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7, 63).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mLockFluid, val -> {
- mLockFluid = val;
-
- String inBrackets;
- if (mLockFluid) {
- if (mFluid == null) {
- setLockedFluidName(null);
- inBrackets = GT_Utility
- .trans("264", "currently none, will be locked to the next that is put in");
- } else {
- setLockedFluidName(getDrainableStack().getFluid().getName());
- inBrackets = getDrainableStack().getLocalizedName();
- }
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- String.format("%s (%s)", GT_Utility.trans("265", "1 specific Fluid"), inBrackets));
- } else {
- setLockedFluidName(null);
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("266", "Lock Fluid Mode Disabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_LOCK)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.lockfluid.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(25, 63).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mAllowInputFromOutputSide, val -> {
- mAllowInputFromOutputSide = val;
- if (!mAllowInputFromOutputSide) {
- GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("096"));
- } else {
- GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("095"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.inputfromoutput.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(43, 63).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidPart, val -> {
- mVoidFluidPart = val;
- if (!mVoidFluidPart) {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("267", "Overflow Voiding Mode Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("268", "Overflow Voiding Mode Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidoverflow.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(151, 7).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidFull, val -> {
- mVoidFluidFull = val;
- if (!mVoidFluidFull) {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("269", "Void Full Mode Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("270", "Void Full Mode Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_ALL)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidfull.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(151, 25).setSize(18, 18));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setPos(7, 16)
+ .setSize(71, 45))
+ .widget(
+ new SlotWidget(inventoryHandler, getInputSlot())
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(79, 16))
+ .widget(
+ new SlotWidget(inventoryHandler, getOutputSlot()).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_OUT)
+ .setPos(79, 43))
+ .widget(
+ new FluidDisplaySlotWidget(
+ inventoryHandler,
+ getStackDisplaySlot()).setFluidAccessConstructor(() -> constructFluidAccess(false))
+ .setIHasFluidDisplay(this)
+ .setCanDrain(true)
+ .setCanFill(!isDrainableStackSeparate())
+ .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER)
+ .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK)
+ .setBeforeRealClick((clickData, widget) -> {
+ if (NetworkUtils.isClient()) {
+ // propagate display item content to actual fluid stored in
+ // this tank
+ setDrainableStack(
+ GT_Utility.getFluidFromDisplayStack(
+ widget.getMcSlot()
+ .getStack()));
+ }
+ return true;
+ })
+ .setBackground(GT_UITextures.TRANSPARENT)
+ .setPos(58, 41))
+ .widget(
+ new TextWidget("Liquid Amount").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 20))
+ .widget(
+ TextWidget.dynamicString(
+ () -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 30))
+ .widget(new CycleButtonWidget().setToggle(() -> mOutputFluid, val -> {
+ mOutputFluid = val;
+ if (!mOutputFluid) {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("262", "Fluid Auto Output Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("263", "Fluid Auto Output Enabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.autooutput.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(7, 63)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mLockFluid, val -> {
+ mLockFluid = val;
+
+ String inBrackets;
+ if (mLockFluid) {
+ if (mFluid == null) {
+ setLockedFluidName(null);
+ inBrackets = GT_Utility.trans(
+ "264",
+ "currently none, will be locked to the next that is put in");
+ } else {
+ setLockedFluidName(
+ getDrainableStack().getFluid()
+ .getName());
+ inBrackets = getDrainableStack().getLocalizedName();
+ }
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ String.format("%s (%s)", GT_Utility.trans("265", "1 specific Fluid"), inBrackets));
+ } else {
+ setLockedFluidName(null);
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("266", "Lock Fluid Mode Disabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_LOCK)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.lockfluid.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(25, 63)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mAllowInputFromOutputSide, val -> {
+ mAllowInputFromOutputSide = val;
+ if (!mAllowInputFromOutputSide) {
+ GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("096"));
+ } else {
+ GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("095"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.inputfromoutput.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(43, 63)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidPart, val -> {
+ mVoidFluidPart = val;
+ if (!mVoidFluidPart) {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("267", "Overflow Voiding Mode Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("268", "Overflow Voiding Mode Enabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.voidoverflow.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(151, 7)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidFull, val -> {
+ mVoidFluidFull = val;
+ if (!mVoidFluidFull) {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("269", "Void Full Mode Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("270", "Void Full Mode Enabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_ALL)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.voidfull.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(151, 25)
+ .setSize(18, 18));
}
@Override