|
23 | 23 | import net.minecraft.nbt.NBTTagCompound; |
24 | 24 | import net.minecraftforge.common.util.ForgeDirection; |
25 | 25 |
|
26 | | -import com.Nxer.TwistSpaceTechnology.common.machine.multiMachineClasses.GTCM_MultiMachineBase; |
| 26 | +import com.Nxer.TwistSpaceTechnology.common.machine.multiMachineClasses.WirelessEnergyMultiMachineBase; |
| 27 | +import com.Nxer.TwistSpaceTechnology.util.TextEnums; |
27 | 28 | import com.Nxer.TwistSpaceTechnology.util.TextLocalization; |
28 | 29 | import com.Nxer.TwistSpaceTechnology.util.TstUtils; |
29 | 30 | import com.gtnewhorizon.structurelib.structure.IStructureDefinition; |
|
46 | 47 | import gregtech.common.blocks.BlockCasings1; |
47 | 48 | import gregtech.common.blocks.BlockCasings8; |
48 | 49 |
|
49 | | -public class GT_TileEntity_Silksong extends GTCM_MultiMachineBase<GT_TileEntity_Silksong> { |
| 50 | +public class GT_TileEntity_Silksong extends WirelessEnergyMultiMachineBase<GT_TileEntity_Silksong> { |
50 | 51 |
|
51 | 52 | // region Class Constructor |
52 | 53 | public GT_TileEntity_Silksong(int aID, String aName, String aNameRegional) { |
@@ -88,6 +89,11 @@ public void loadNBTData(final NBTTagCompound aNBT) { |
88 | 89 | piece = aNBT.getInteger("piece"); |
89 | 90 | } |
90 | 91 |
|
| 92 | + @Override |
| 93 | + public int getWirelessModeProcessingTime() { |
| 94 | + return 188; |
| 95 | + } |
| 96 | + |
91 | 97 | @Override |
92 | 98 | public RecipeMap<?> getRecipeMap() { |
93 | 99 | return RecipeMaps.wiremillRecipes; |
@@ -120,6 +126,15 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a |
120 | 126 | speedBonus = (float) (Math.pow(SpeedBonus_MultiplyPerVoltageTier_Silksong, getTotalPowerTier()) |
121 | 127 | / (getCoilTier() * SpeedMultiplier_CoilTier_Silksong)); |
122 | 128 |
|
| 129 | + // allow machine use perfect overclock when piece reach 94, and enter wireless mode if no energy hatch |
| 130 | + if (piece >= 94) { |
| 131 | + enablePerfectOverclock = true; |
| 132 | + wirelessMode = mEnergyHatches.isEmpty() && mExoticEnergyHatches.isEmpty(); |
| 133 | + } else { |
| 134 | + enablePerfectOverclock = false; |
| 135 | + wirelessMode = false; |
| 136 | + } |
| 137 | + |
123 | 138 | return true; |
124 | 139 | } |
125 | 140 | // endregion |
@@ -304,6 +319,10 @@ protected MultiblockTooltipBuilder createTooltip() { |
304 | 319 | .addInputBus(TextLocalization.textUseBlueprint, 3) |
305 | 320 | .addOutputBus(TextLocalization.textUseBlueprint, 2) |
306 | 321 | .addEnergyHatch(TextLocalization.textUseBlueprint, 1) |
| 322 | + // #tr Tooltip_Silksong_SilksongReleaseDate |
| 323 | + // # {\BLACK}Something special when piece reaches 94. |
| 324 | + // #zh_CN {\BLACK}层数达到94层后有一些特别的东西. |
| 325 | + .addStructureInfo(TextEnums.tr("Tooltip_Silksong_SilksongReleaseDate")) |
307 | 326 | .toolTipFinisher(TextLocalization.ModName); |
308 | 327 | return tt; |
309 | 328 | } |
|
0 commit comments