diff options
| author | miozune <miozune@gmail.com> | 2023-12-29 21:32:03 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-29 13:32:03 +0100 |
| commit | 630761e5d633eb976f4a1bd2178a3fbcae5072d4 (patch) | |
| tree | 4ac085ba09e76c63f0b3cbcc0026861644543081 /src/main/java | |
| parent | 90615c78f2219b0fadf50c1c31b9e678ddc808c1 (diff) | |
| download | GT5-Unofficial-630761e5d633eb976f4a1bd2178a3fbcae5072d4.tar.gz GT5-Unofficial-630761e5d633eb976f4a1bd2178a3fbcae5072d4.tar.bz2 GT5-Unofficial-630761e5d633eb976f4a1bd2178a3fbcae5072d4.zip | |
Cleanup deprecation (#2416)
* Remove isValidMetaTileEntity and filterValidMetaTileEntities
* Remove OUTPUT_FULL
* Remove calclavia oredict
* Remove unused GT_GUIColorOverride constructor
* Remove getItemGridPositions
* Remove unused tool classes
* Remove unused GT_Runnable_Sound constructors
* Remove unused cover constructors
* Remove getBasicOutput()
* Remove unused GT_MetaTileEntity_GasTurbine constructors
* Remove ImplosionCompressorRecipes#addImplosionRecipe
* Remove mOutputItem1 & mOutputItem2
* Remove GT_MetaTileEntity_Miner#moveOneDown & #getFakePlayer
* Remove unused GT_Worldgen_GT_Ore_Layer constructor
* Remove GT_ModReference
* Remove deprecated BaseMetaTileEntity#receiveMetaTileEntityData
* Remove deprecated cover variables
* Remove deprecated GT_CoverBehaviorBase#isCoverPlaceable
* Remove unused variables from GT_MachineRecipeLoader
* Remove #getCalcificationOutput
* Remove IC2_Fuel_Can_Empty and IC2_Fuel_Can_Filled
* Remove deprecated #polluteEnvironment()
* Remove FluidDisplaySlotWidget
Diffstat (limited to 'src/main/java')
56 files changed, 1 insertions, 1539 deletions
diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 5ecf39a722..ac1aeeb7b2 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -87,10 +87,6 @@ public enum ItemList implements IItemContainer { IC2_Compressed_Coal_Ball, IC2_Compressed_Coal_Chunk, IC2_Fuel_Rod_Empty, - @Deprecated - IC2_Fuel_Can_Empty(true), - @Deprecated - IC2_Fuel_Can_Filled(true), IC2_Food_Can_Empty, IC2_Food_Can_Filled, IC2_Food_Can_Spoiled, diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index e86b0ee9b1..e9294e7258 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -180,7 +180,6 @@ public enum OrePrefixes { B[1], M * 3, 64, 19), plateDouble("2x Plates", "Double ", " Plate", true, true, false, false, false, false, true, true, false, false, B[1], M * 2, 64, 18), - /** Regular Plate made of one Ingot/Dust. Introduced by Calclavia */ plate("Plates", "", " Plate", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, 64, 17), /** Casing made of 1/2 Ingot/Dust */ @@ -245,7 +244,6 @@ public enum OrePrefixes { /** Hot Cell full of molten stuff, which can be used in the Plasma Generator. */ cellMolten("Cells of Molten stuff", "Molten ", " Cell", true, true, true, true, false, false, false, true, false, false, 0, M * 1, 64, 31), - /** Regular Gas/Fluid Cell. Introduced by Calclavia */ cell("Cells", "", " Cell", true, true, true, true, false, false, true, true, false, false, B[4] | B[8], M * 1, 64, 30), /** A vanilla Iron Bucket filled with the Material. */ @@ -517,10 +515,8 @@ public enum OrePrefixes { */ batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - /** Introduced by Calclavia */ battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - /** Introduced by Calclavia */ circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), /** Introduced by Buildcraft */ chipset("Chipsets", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), diff --git a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java index 85e56d9b52..304e792a2a 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java +++ b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java @@ -60,14 +60,6 @@ public class GT_GUIColorOverride { cmSection = null; } - /** - * @deprecated use {@link #get(String)} instead. - */ - @Deprecated - public GT_GUIColorOverride(String guiTexturePath) { - this(new ResourceLocation(guiTexturePath)); - } - private GT_GUIColorOverride(ResourceLocation resourceLocation) { try { Object metadata = cache.get(resourceLocation); diff --git a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java b/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java deleted file mode 100644 index e7435dd14b..0000000000 --- a/src/main/java/gregtech/api/interfaces/IHasFluidDisplayItem.java +++ /dev/null @@ -1,7 +0,0 @@ -package gregtech.api.interfaces; - -@Deprecated -public interface IHasFluidDisplayItem { - - void updateFluidDisplayItem(); -} diff --git a/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java b/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java deleted file mode 100644 index 6d84a64e0a..0000000000 --- a/src/main/java/gregtech/api/items/GT_SolderingTool_Item.java +++ /dev/null @@ -1,49 +0,0 @@ -package gregtech.api.items; - -import static gregtech.api.enums.GT_Values.W; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ToolDictNames; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; - -public class GT_SolderingTool_Item extends GT_Tool_Item { - - public GT_SolderingTool_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage, - int aDischargedGTID) { - super( - aUnlocalized, - aEnglish, - "To repair and construct Circuitry", - aMaxDamage, - aEntityDamage, - true, - -1, - aDischargedGTID); - GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingIron, new ItemStack(this, 1, W)); - GregTech_API.registerSolderingTool(new ItemStack(this, 1, W)); - } - - @Override - public void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) { - aList.add( - GT_LanguageManager - .addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Sets the Strength of outputted Redstone")); - aList.add( - GT_LanguageManager - .addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Needs Soldering Metal in Inventory!")); - } - - @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - int ordinalSide, float hitX, float hitY, float hitZ) { - super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, ordinalSide, hitX, hitY, hitZ); - return false; - } -} diff --git a/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java deleted file mode 100644 index 0716ca9dc1..0000000000 --- a/src/main/java/gregtech/api/items/GT_Spray_Bug_Item.java +++ /dev/null @@ -1,66 +0,0 @@ -package gregtech.api.items; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.enums.SoundResource; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -public class GT_Spray_Bug_Item extends GT_Tool_Item { - - public GT_Spray_Bug_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super( - aUnlocalized, - aEnglish, - "A very 'buggy' Spray", - aMaxDamage, - aEntityDamage, - true); /* - * addToEffectiveList(EntityCaveSpider.class.getName()); - * addToEffectiveList(EntitySpider.class.getName()); addToEffectiveList("EntityTFHedgeSpider"); - * addToEffectiveList("EntityTFKingSpider"); addToEffectiveList("EntityTFSwarmSpider"); - * addToEffectiveList("EntityTFTowerBroodling"); addToEffectiveList("EntityTFFireBeetle"); - * addToEffectiveList("EntityTFSlimeBeetle"); setCraftingSound(Sounds.IC2_TOOLS_PAINTER); - * setBreakingSound(Sounds.IC2_TOOLS_PAINTER); setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); - * setUsageAmounts(8, 4, 1); - */ - } - - /* - * @Override public void onHitEntity(Entity aEntity) { if (aEntity instanceof EntityLiving) { - * ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 60, 1, false)); - * ((EntityLiving)aEntity).addPotionEffect(new PotionEffect(Potion.confusion.getId(), 600, 1, false)); } } - * @Override public ItemStack getEmptiedItem(ItemStack aStack) { return ItemList.Spray_Empty.get(1); } - */ - @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - int ordinalSide, float hitX, float hitY, float hitZ) { - super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, ordinalSide, hitX, hitY, hitZ); - if (aWorld.isRemote) { - return false; - } - Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) return false; - // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); - TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - - try { - if (aTileEntity instanceof ic2.api.crops.ICropTile) { - int tCropBefore = ((ic2.api.crops.ICropTile) aTileEntity).getWeedExStorage(); - if (tCropBefore <= 100 && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - ((ic2.api.crops.ICropTile) aTileEntity).setWeedExStorage(tCropBefore + 100); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - return true; - } - } - } catch (Throwable e) { - /* Do nothing */ - } - - return false; - } -} diff --git a/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java deleted file mode 100644 index 6bdca0da1c..0000000000 --- a/src/main/java/gregtech/api/items/GT_Spray_Foam_Item.java +++ /dev/null @@ -1,156 +0,0 @@ -package gregtech.api.items; - -import static gregtech.api.enums.GT_Values.D1; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.enums.SoundResource; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -public class GT_Spray_Foam_Item extends GT_Tool_Item { - - public GT_Spray_Foam_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super( - aUnlocalized, - aEnglish, - "Precision Spray", - aMaxDamage, - aEntityDamage, - true); /* - * setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - * setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); setUsageAmounts(25, 3, 1); - */ - } - - @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - int ordinalSide, float hitX, float hitY, float hitZ) { - super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, ordinalSide, hitX, hitY, hitZ); - if (aPlayer.isSneaking()) return false; - if (aWorld.isRemote) { - return false; - } - Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) return false; - // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); - TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); - - try { - if (GT_Utility.getClassName(aTileEntity) - .startsWith("TileEntityCable")) { - if (GT_Utility.getPublicField(aTileEntity, "foamed") - .getByte(aTileEntity) == 0) { - if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - GT_Utility.callPublicMethod(aTileEntity, "changeFoam", (byte) 1); - return true; - } - } - return false; - } - } catch (Throwable e) { - if (D1) e.printStackTrace(GT_Log.err); - } - - if (aTileEntity instanceof BaseMetaPipeEntity && (((BaseMetaPipeEntity) aTileEntity).mConnections & -64) == 0) { - if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - ((BaseMetaPipeEntity) aTileEntity).mConnections |= 64; - } - return true; - } - - aX += ForgeDirection.getOrientation(ordinalSide).offsetX; - aY += ForgeDirection.getOrientation(ordinalSide).offsetY; - aZ += ForgeDirection.getOrientation(ordinalSide).offsetZ; - - ItemStack tStack = GT_ModHandler.getIC2Item("constructionFoam", 1); - if (tStack != null && tStack.getItem() instanceof ItemBlock) { - int tRotationPitch = Math.round(aPlayer.rotationPitch); - byte tSide = 0; - if (tRotationPitch >= 65) { - tSide = 1; - } else if (tRotationPitch <= -65) { - tSide = 0; - } else { - tSide = switch (MathHelper.floor_double((aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3) { - case 0 -> 2; - case 1 -> 5; - case 2 -> 3; - case 3 -> 4; - default -> tSide; - }; - } - switch (0) { - case 0 -> { - if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) - && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); - return true; - } - } - case 1 -> { - for (byte i = 0; i < 4; i++) { - if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) - && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility - .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - aWorld - .setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); - } else { - if (i == 0) return false; - break; - } - aX -= ForgeDirection.getOrientation(tSide).offsetX; - aY -= ForgeDirection.getOrientation(tSide).offsetY; - aZ -= ForgeDirection.getOrientation(tSide).offsetZ; - } - return true; - } - case 2 -> { - boolean temp = false, tXFactor = (ForgeDirection.getOrientation(tSide).offsetX == 0), - tYFactor = (ForgeDirection.getOrientation(tSide).offsetY == 0), - tZFactor = (ForgeDirection.getOrientation(tSide).offsetZ == 0); - aX -= (tXFactor ? 1 : 0); - aY -= (tYFactor ? 1 : 0); - aZ -= (tZFactor ? 1 : 0); - for (byte i = 0; i < 3; i++) for (byte j = 0; j < 3; j++) { - if (GT_Utility.isBlockAir( - aWorld, - aX + (tXFactor ? i : 0), - aY + (!tXFactor && tYFactor ? i : 0) + (!tZFactor && tYFactor ? j : 0), - aZ + (tZFactor ? j : 0))) { - if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { - GT_Utility - .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_PAINTER, 1.0F, -1, aX, aY, aZ); - aWorld.setBlock( - aX + (tXFactor ? i : 0), - aY + (!tXFactor && tYFactor ? i : 0) + (!tZFactor && tYFactor ? j : 0), - aZ + (tZFactor ? j : 0), - GT_Utility.getBlockFromStack(tStack), - tStack.getItemDamage(), - 3); - temp = true; - } else { - break; - } - } - } - return temp; - } - } - } - return false; - } -} diff --git a/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java b/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java deleted file mode 100644 index 2fecc77c14..0000000000 --- a/src/main/java/gregtech/api/items/GT_Spray_Hardener_Item.java +++ /dev/null @@ -1,86 +0,0 @@ -package gregtech.api.items; - -import static gregtech.api.enums.GT_Values.D1; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import gregtech.api.enums.SoundResource; -import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; - -public class GT_Spray_Hardener_Item extends GT_Tool_Item { - - public GT_Spray_Hardener_Item(String aUnlocalized, String aEnglish, int aMaxDamage, int aEntityDamage) { - super( - aUnlocalized, - aEnglish, - "Construction Foam Hardener", - aMaxDamage, - aEntityDamage, - true); /* - * setCraftingSound(Sounds.IC2_TOOLS_PAINTER); setBreakingSound(Sounds.IC2_TOOLS_PAINTER); - * setEntityHitSound(Sounds.IC2_TOOLS_PAINTER); setUsageAmounts(16, 3, 1); - */ - } - - @Override - public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - int ordinalSide, float hitX, float hitY, float hitZ) { - super.onItemUseFirst(aStack, aPlayer, aWorld, aX, aY, aZ, ordinalSide, hitX, hitY, hitZ); - if (aWorld.isRemote) { - return false; - } - Block aBlock = aWorld.getBlock(aX, aY, aZ); - if (aBlock == null) return false; - // byte aMeta = (byte)aWorld.getBlockMetadata(aX, aY, aZ); |
