aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/items
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-05-26 14:41:09 +0900
committerGitHub <noreply@github.com>2023-05-26 07:41:09 +0200
commit67b48690b1078b489bcb017e8db9200f26b77a0c (patch)
tree83cd38af2a564a016680652327623748a73f2bf5 /src/main/java/gtPlusPlus/xmod/gregtech/common/items
parent69791bd5a4e5fc5ff6d79b0510c572612ce8bae8 (diff)
downloadGT5-Unofficial-67b48690b1078b489bcb017e8db9200f26b77a0c.tar.gz
GT5-Unofficial-67b48690b1078b489bcb017e8db9200f26b77a0c.tar.bz2
GT5-Unofficial-67b48690b1078b489bcb017e8db9200f26b77a0c.zip
Deprecation cleanup (#637)
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/items')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java40
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java22
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java19
3 files changed, 15 insertions, 66 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index cc4503e46e..b53daf4f31 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.items;
+import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.client.GT_TooltipHandler.Tier.*;
import static gregtech.client.GT_TooltipHandler.registerTieredTooltip;
import static gtPlusPlus.core.util.Utils.getTcAspectStack;
@@ -16,6 +17,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_MultiTexture;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_FoodStat;
import gregtech.api.util.GT_ModHandler;
import gregtech.common.covers.GT_Cover_Arm;
@@ -35,7 +37,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow;
-import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual;
public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
@@ -386,31 +387,6 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[9] * 10 * 60 * 20, GT_Values.V[8], 8L, -3L, false);
- String aTierName;
- int aFirstMachineCasingID = 130;
- GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] { GregtechItemList.FakeMachineCasingPlate_ULV,
- GregtechItemList.FakeMachineCasingPlate_LV, GregtechItemList.FakeMachineCasingPlate_MV,
- GregtechItemList.FakeMachineCasingPlate_HV, GregtechItemList.FakeMachineCasingPlate_EV,
- GregtechItemList.FakeMachineCasingPlate_IV, GregtechItemList.FakeMachineCasingPlate_LuV,
- GregtechItemList.FakeMachineCasingPlate_ZPM, GregtechItemList.FakeMachineCasingPlate_UV,
- GregtechItemList.FakeMachineCasingPlate_MAX, };
- for (int i = 0; i < 10; i++) {
- if (i == 10) {
- break;
- } else {
- aTierName = GT_Values.VN[i];
- mMachineCasingCovers[i].set(
- this.addItem(
- aFirstMachineCasingID++,
- aTierName + " Machine Plate Cover",
- "Deprecated - Shapeless Craft to new version",
- new Object[] {}));
- GregTech_API.registerCover(
- mMachineCasingCovers[i].get(1L),
- new GT_MultiTexture(new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[i][0] }),
- new GTPP_Cover_ToggleVisual());
- }
- }
GregtechItemList.Laser_Lens_WoodsGlass.set(
this.addItem(
140,
@@ -513,19 +489,19 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
new GT_MultiTexture(
new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[5][0],
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
- new GT_Cover_Pump(8));
+ new GT_Cover_Pump(8, TextureFactory.of(OVERLAY_PUMP)));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_ULV.get(1L),
new GT_MultiTexture(
new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][0],
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
- new GT_Cover_Conveyor(1600));
+ new GT_Cover_Conveyor(1600, 1, TextureFactory.of(OVERLAY_CONVEYOR)));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_ULV.get(1L),
new GT_MultiTexture(
new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][0],
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
- new GT_Cover_Arm(1600));
+ new GT_Cover_Arm(1600, TextureFactory.of(OVERLAY_ARM)));
return true;
}
@@ -595,19 +571,19 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
new GT_MultiTexture(
new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[8][0],
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
- new GT_Cover_Pump(524288));
+ new GT_Cover_Pump(524288, TextureFactory.of(OVERLAY_PUMP)));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_MAX.get(1L),
new GT_MultiTexture(
new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
- new GT_Cover_Conveyor(4));
+ new GT_Cover_Conveyor(4, 1, TextureFactory.of(OVERLAY_CONVEYOR)));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_MAX.get(1L),
new GT_MultiTexture(
new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
- new GT_Cover_Arm(4));
+ new GT_Cover_Arm(4, TextureFactory.of(OVERLAY_ARM)));
return true;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
index a5d09bcbd9..db3638a4e0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
@@ -12,7 +12,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import codechicken.lib.math.MathHelper;
-import gregtech.api.GregTech_API;
+import gregtech.api.enums.SoundResource;
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
@@ -46,7 +46,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
GT_Utility.sendSoundToPlayers(
aPlayer.worldObj,
- (String) GregTech_API.sSoundList.get(6),
+ SoundResource.FIRE_IGNITE,
1.0F,
1.0F,
MathHelper.floor_double(aEntity.posX),
@@ -102,14 +102,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
Logger.WARNING("Preparing Lighter b");
if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
Logger.WARNING("Preparing Lighter c");
- GT_Utility.sendSoundToPlayers(
- aWorld,
- (String) GregTech_API.sSoundList.get(6),
- 1.0F,
- 1.0F,
- aX,
- aY,
- aZ);
+ GT_Utility.sendSoundToPlayers(aWorld, SoundResource.FIRE_IGNITE, 1.0F, 1.0F, aX, aY, aZ);
aWorld.setBlock(aX, aY, aZ, Blocks.fire);
rOutput = true;
// ItemNBT.setLighterFuel(aStack, tFuelAmount);
@@ -162,14 +155,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
Logger.WARNING("Preparing Lighter b");
if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
Logger.WARNING("Preparing Lighter c");
- GT_Utility.sendSoundToPlayers(
- aWorld,
- (String) GregTech_API.sSoundList.get(6),
- 1.0F,
- 1.0F,
- aX,
- aY,
- aZ);
+ GT_Utility.sendSoundToPlayers(aWorld, SoundResource.FIRE_IGNITE, 1.0F, 1.0F, aX, aY, aZ);
aWorld.setBlock(aX, aY, aZ, Blocks.fire);
rOutput = true;
// ItemNBT.setLighterFuel(aStack, tFuelAmount);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
index 78f77a7b33..7fd7de322c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
@@ -13,6 +13,7 @@ import net.minecraftforge.fluids.IFluidBlock;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
+import gregtech.api.enums.SoundResource;
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.objects.ItemData;
@@ -52,14 +53,7 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
GT_Utility.sendChatToPlayer(
aPlayer,
"This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- GT_Utility.sendSoundToPlayers(
- aWorld,
- GregTech_API.sSoundList.get(Integer.valueOf(1)),
- 1.0F,
- -1.0F,
- aX,
- aY,
- aZ);
+ GT_Utility.sendSoundToPlayers(aWorld, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1.0F, aX, aY, aZ);
return true;
}
if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone))
@@ -69,14 +63,7 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
|| (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt))
|| (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass))) {
if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- GT_Utility.sendSoundToPlayers(
- aWorld,
- GregTech_API.sSoundList.get(Integer.valueOf(1)),
- 1.0F,
- -1.0F,
- aX,
- aY,
- aZ);
+ GT_Utility.sendSoundToPlayers(aWorld, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1.0F, aX, aY, aZ);
int tX = aX;
int tY = aY;
int tZ = aZ;