Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Add debug uncertainty #267

Merged
merged 9 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static gregtech.api.enums.Mods.Thaumcraft;
import static gregtech.api.enums.Mods.TinkersGregworks;
import static gregtech.api.util.GT_ModHandler.getModItem;
import static gregtech.api.util.GT_RecipeBuilder.INGOTS;
import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;

Expand Down Expand Up @@ -1222,6 +1223,27 @@ public void run() {
6000,
500000);

if (GTPlusPlus.isModLoaded()) {
// Debug uncertainty resolver
TT_recipeAdder.addResearchableAssemblylineRecipe(
CustomItemList.UncertaintyX_Hatch.get(1L),
72_000_000,
5_120,
16_000_000,
6,
new Object[] { CustomItemList.eM_Computer_Bus.get(1),
CustomItemList.hatch_CreativeMaintenance.get(1), ItemList.Field_Generator_UIV.get(1L),
GregtechItemList.Laser_Lens_Special.get(4),
new Object[] { OrePrefixes.circuit.get(Materials.Piko), 2 },
CustomItemList.DATApipe.get(64), CustomItemList.DATApipe.get(64),
ItemList.Cover_Screen.get(1) },
new FluidStack[] { Materials.Iridium.getMolten(INGOTS * 100), new FluidStack(solderUEV, 2592),
new FluidStack(ELEMENT.getInstance().NEPTUNIUM.getPlasma(), 20000),
new FluidStack(ELEMENT.getInstance().FERMIUM.getPlasma(), 20000) },
CustomItemList.hatch_CreativeUncertainty.get(1),
200 * 20,
(int) TierEU.RECIPE_UIV);
}
}

private void itemPartsUHVAsslineRecipes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
import static com.github.technus.tectech.thing.CustomItemList.eM_energyWirelessTunnel7_UXV;
import static com.github.technus.tectech.thing.CustomItemList.hatch_CreativeData;
import static com.github.technus.tectech.thing.CustomItemList.hatch_CreativeMaintenance;
import static com.github.technus.tectech.thing.CustomItemList.hatch_CreativeUncertainty;
import static com.github.technus.tectech.thing.CustomItemList.holder_Hatch;
import static com.github.technus.tectech.thing.CustomItemList.rack_Hatch;
import static com.github.technus.tectech.util.CommonValues.V;
Expand All @@ -297,6 +298,7 @@
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_CreativeData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_CreativeMaintenance;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_CreativeUncertainty;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoTunnel;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
Expand Down Expand Up @@ -2234,6 +2236,9 @@ public void run() {
new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 14)
.getStackForm(1L));
UnusedStuff.set(new ItemStack(Blocks.air));
hatch_CreativeUncertainty.set(
new GT_MetaTileEntity_Hatch_CreativeUncertainty(15510, "debug.tt.certain", "Uncertainty Resolution", 14)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put “debug” or “creative” in the localized name to make it easy to search.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creative maintenance has no "creative" in the name too isn't it? Can easily search for it by "uncertainty" so it's enough imo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make this block craftable in endgame? that's when multiple quantum computers are needed and the uncertainty minigame is not really fun after doing it for the n-th time
In that case the name would be fine

.getStackForm(1));

// ===================================================================================================
// MetaTE init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public enum CustomItemList implements IItemContainer {

hatch_CreativeMaintenance,
hatch_CreativeData,
hatch_CreativeUncertainty,
Machine_OwnerDetector,
Machine_BuckConverter_IV,
Machine_BuckConverter_LuV,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch;

import static net.minecraft.util.StatCollector.translateToLocal;

import net.minecraft.util.EnumChatFormatting;

import com.github.technus.tectech.util.CommonValues;

import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;

public class GT_MetaTileEntity_Hatch_CreativeUncertainty extends GT_MetaTileEntity_Hatch_Uncertainty {

public GT_MetaTileEntity_Hatch_CreativeUncertainty(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier);
}

public GT_MetaTileEntity_Hatch_CreativeUncertainty(String aName, int aTier, String[] aDescription,
ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
return new GT_MetaTileEntity_Hatch_CreativeUncertainty(mName, mTier, mDescriptionArray, mTextures);
}

@Override
public String[] getDescription() {
return new String[] { CommonValues.TEC_MARK_EM, translateToLocal("gt.blockmachines.debug.tt.certain.desc.0"), // Feeling
// certain,
// for
// sure
EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD
+ translateToLocal("gt.blockmachines.debug.tt.certain.desc.1") // Schrödinger's cat escaped the
// box
};
}

@Override
public void regenerate() {
// no-op
}

@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isServerSide() && (aTick % 100) == 0) {
if (mode == 0) {
aBaseMetaTileEntity.setActive(false);
status = -128;
} else {
aBaseMetaTileEntity.setActive(true);
compute();
}
}
}
}
2 changes: 2 additions & 0 deletions src/main/resources/assets/tectech/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ gt.blockmachines.debug.tt.writer.name=Debug Structure Writer
gt.blockmachines.debug.tt.writer.desc.0=Scans Blocks Around
gt.blockmachines.debug.tt.writer.desc.1=Prints Multiblock NonTE structure check code
gt.blockmachines.debug.tt.writer.desc.2=ABC axises aligned to machine front
gt.blockmachines.debug.tt.certain.desc.0=Feeling certain, for sure
gt.blockmachines.debug.tt.certain.desc.1=Schrödinger's cat escaped the box

GT5U.gui.text.computing=§aComputing
GT5U.gui.text.providing_data=§aProviding Data
Expand Down