From c2e8f2754f8b5868e7b2110c6442410ce686ff0a Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Sat, 24 Aug 2024 15:12:00 +0200 Subject: Make frame boxes no longer TileEntities (#2799) * fiddling around with frame boxes * more fiddling * am trying * frames exist * fix frame rendering in inventory * Fix in world frame rendering * Apply cover to dumb frame * continue work on frames * apply covers to correct side and fix crash on load * Test permissions * fix oredict for new frames and create recipes * fix waila names and drops (kind of) * fix drops * mostly all working * remove old comment * fix structurecheck using new frames * create the TE transformer * it didnt work * dont modify tes we dont want to modify (needs future postea update) * it works! * item transformer works too * spotless * add more method overrides from generic gt block? * update postea * fix postea transforming items in reserved frame range that were not frame boxes * fix tesla tower structurecheck + capacitor hatch crash * Update src/main/java/gregtech/common/blocks/GT_Block_FrameBox.java Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> * Update src/main/java/gregtech/common/blocks/GT_Block_FrameBox.java Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> * Update src/main/java/gregtech/common/blocks/GT_Block_FrameBox.java Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> * Update src/main/java/gregtech/common/blocks/GT_Block_FrameBox.java Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> * Spotless apply for branch dumb-frames for #2799 (#2953) spotlessApply Co-authored-by: GitHub GTNH Actions <> * remove extra null check * Update src/main/java/gregtech/common/blocks/GT_Block_FrameBox.java Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> * remove more messy instanceof checks * Spotless apply for branch dumb-frames for #2799 (#2954) spotlessApply Co-authored-by: GitHub GTNH Actions <> * remove unnecessary null check * try fixing facade color * Update src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> * small cleanup in framebox gen code * swap material for frame box block * fix description * make getMaterial static and add fix AE cover color * nicer casts + localize tooltip in frame block instead of stealing old localization * draw grid on cover hover * add a null check in getTexture() that hopefully fixes crash in full pack when interacting with frame boxes * also draw grid when hovering with wrench * add chemical element back to tooltip * fix breaking frame not causing structure update --------- Co-authored-by: Martin Robertz Co-authored-by: Alexander Anishin <14104815+OneEyeMaker@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../implementations/GT_MetaPipeEntity_Frame.java | 35 ++-------------------- 1 file changed, 2 insertions(+), 33 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java index 399c536b9f..7cb2b3a9bd 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java @@ -1,30 +1,18 @@ package gregtech.api.metatileentity.implementations; -import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; -import static gregtech.api.util.GT_RecipeBuilder.SECONDS; -import static gregtech.api.util.GT_RecipeBuilder.TICKS; -import static gregtech.api.util.GT_Utility.calculateRecipeEU; - import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; import gregtech.api.enums.Dyes; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; -import gregtech.api.enums.TierEU; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_ModHandler.RecipeBits; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { @@ -35,27 +23,8 @@ public class GT_MetaPipeEntity_Frame extends MetaPipeEntity { public GT_MetaPipeEntity_Frame(int aID, String aName, String aNameRegional, Materials aMaterial) { super(aID, aName, aNameRegional, 0); mMaterial = aMaterial; - - GT_OreDictUnificator.registerOre(OrePrefixes.frameGt, aMaterial, getStackForm(1)); - if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) { - GT_ModHandler.addCraftingRecipe( - getStackForm(2), - RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { "SSS", "SwS", "SSS", 'S', OrePrefixes.stick.get(mMaterial) }); - } - - if (!aMaterial.contains(SubTag.NO_RECIPES) - && GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1) != null) { - // Auto generate frame box recipe in an assembler. - GT_Values.RA.stdBuilder() - .itemInputs( - GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 4), - GT_Utility.getIntegratedCircuit(4)) - .itemOutputs(getStackForm(1)) - .duration(3 * SECONDS + 4 * TICKS) - .eut(calculateRecipeEU(aMaterial, 7)) - .addTo(assemblerRecipes); - } + // Hide TileEntity frame in NEI, since we have the block version now that should always be used + codechicken.nei.api.API.hideItem(this.getStackForm(1)); } public GT_MetaPipeEntity_Frame(String aName, Materials aMaterial) { -- cgit