aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/multitileentity/base
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2022-08-07 01:52:44 +0200
committerGitHub <noreply@github.com>2022-08-07 06:52:44 +0700
commit6f13a66b69124458b731f5b4760abd4b5fafabbe (patch)
tree721f004cdea108e145917c834f34d0d40855a949 /src/main/java/gregtech/api/multitileentity/base
parent6445aa58dc024350fb6e067725d23d1bbababc65 (diff)
downloadGT5-Unofficial-6f13a66b69124458b731f5b4760abd4b5fafabbe.tar.gz
GT5-Unofficial-6f13a66b69124458b731f5b4760abd4b5fafabbe.tar.bz2
GT5-Unofficial-6f13a66b69124458b731f5b4760abd4b5fafabbe.zip
fix(warnings): re-enable and deal with specific warnings (#1221)
* fix(multitile): upgrade to SoundResource enum * fix(warnings): re-enable and deal with specific warnings - Nukes @SuppressWarning("ALL") abomination; that hid a real bug of infinite recursion, that would have caused a crash in some cover registrations. - Reviewed and addressed each individual warning, down to typo or grammar. - Either fixed or disabled warning on minimal scope, with commented reason. * add(javadoc): document deprecated
Diffstat (limited to 'src/main/java/gregtech/api/multitileentity/base')
-rw-r--r--src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java b/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java
index 387b50d7c8..f479b8150f 100644
--- a/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java
+++ b/src/main/java/gregtech/api/multitileentity/base/BaseMultiTileEntity.java
@@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
+import gregtech.api.enums.SoundResource;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregtechWailaProvider;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
@@ -657,7 +658,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements
{
setCoverItemAtSide(coverSide, tCurrentItem);
if (!aPlayer.capabilities.isCreativeMode) tCurrentItem.stackSize--;
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
+ GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord);
issueClientUpdate();
}
sendCoverDataIfNeeded();
@@ -666,7 +667,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements
} else {
if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList)) {
if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(0), 1.0F, -1, xCoord, yCoord, zCoord);
+ GT_Utility.sendSoundToPlayers(worldObj, SoundResource.RANDOM_BREAK, 1.0F, -1, xCoord, yCoord, zCoord);
dropCover(coverSide, aSide, false);
}
sendCoverDataIfNeeded();
@@ -693,7 +694,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements
public boolean onWrenchRightClick(EntityPlayer aPlayer, ItemStack tCurrentItem, byte wrenchSide, float aX, float aY, float aZ) {
if(setMainFacing(wrenchSide)) {
GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer);
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
+ GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord);
}
return true;
}
@@ -702,7 +703,7 @@ public abstract class BaseMultiTileEntity extends CoverableTileEntity implements
if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 200, aPlayer)) {
setCoverDataAtSide(wrenchSide, getCoverBehaviorAtSideNew(wrenchSide).onCoverScrewdriverClick(wrenchSide, getCoverIDAtSide(wrenchSide), getComplexCoverDataAtSide(wrenchSide), this, aPlayer, aX, aY, aZ));
// TODO: Update connections!
- GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord);
+ GT_Utility.sendSoundToPlayers(worldObj, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, xCoord, yCoord, zCoord);
}
return true;
}