diff options
| author | miozune <miozune@gmail.com> | 2023-09-23 00:10:19 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 17:10:19 +0200 |
| commit | 2e17750625e73ed55af9cbd446593cbc3e04c978 (patch) | |
| tree | 137b18599be0d0edcb3e170b9909fc7ec92a7d70 /src/main/java/gregtech/api/metatileentity/examples | |
| parent | 050553dc3262e15e8e016ce19419bd7e428d9f67 (diff) | |
| download | GT5-Unofficial-2e17750625e73ed55af9cbd446593cbc3e04c978.tar.gz GT5-Unofficial-2e17750625e73ed55af9cbd446593cbc3e04c978.tar.bz2 GT5-Unofficial-2e17750625e73ed55af9cbd446593cbc3e04c978.zip | |
Cleanup GT_MetaTileEntity_BasicMachine (#2268)
* Remove unused machines
* Add some Javadoc
* Remove some unused constructors
* Use ResourceLocation and SpecialEffects for newMetaEntity
* Remove some non-ModularUI code
* Remove mGUIParameterA and mGUIParameterB
* Remove mGUIName and mNEIName
* Use nonnull string
* updateBuildScript
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/examples')
| -rw-r--r-- | src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java | 143 |
1 files changed, 0 insertions, 143 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java deleted file mode 100644 index 811a30d341..0000000000 --- a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java +++ /dev/null @@ -1,143 +0,0 @@ -package gregtech.api.metatileentity.examples; - -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE_GLOW; -import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_GLOW; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.enums.SoundResource; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -/** - * This Example Implementation still works, however I use something completely different in my own Code. - */ -public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine { - - public GT_MetaTileEntity_E_Furnace(int aID, String aName, String aNameRegional, int aTier) { - super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Not like using a Commodore 64", - 1, - 1, - "E_Furnace.png", - "smelting", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_FURNACE_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW) - .glow() - .build()), - TextureFactory.of( - TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE), - TextureFactory.builder() - .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW) - .glow() - .build())); - } - - public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - - @Override - public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescriptionArray, mTextures, mGUIName, mNEIName); - } - - @Override - public int checkRecipe() { - if (null != (mOutputItems[0] = GT_ModHandler.getSmeltingOutput(getInputAt(0), true, getOutputAt(0)))) { - calculateOverclockedNess(4, 128); - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - return FOUND_AND_SUCCESSFULLY_USED_RECIPE; - } - return DID_NOT_FIND_RECIPE; - } - - @Override - protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { - return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, side, aStack) - && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64, aStack), false, null) != null; - } - - @Override - public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { - super.startSoundLoop(aIndex, aX, aY, aZ); - if (aIndex == 1) - GT_Utility.doSoundAtClient(SoundResource.IC2_MACHINES_ELECTROFURNACE_LOOP, 10, 1.0F, aX, aY, aZ); - } - - @Override - public void startProcess() { - sendLoopStart((byte) 1); - } -} |
