diff options
| author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-09-28 13:25:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-28 11:25:01 +0000 |
| commit | 86f1765b171f4cc6f163b8027d1330f4e5094e2d (patch) | |
| tree | b6e293bd3c976558fc4e4b7190e4d342c2ddc555 /src/main/java/gtnhlanth | |
| parent | 6b1f145f5028f1bc92cf478e5963224e7d94b5cd (diff) | |
| download | GT5-Unofficial-86f1765b171f4cc6f163b8027d1330f4e5094e2d.tar.gz GT5-Unofficial-86f1765b171f4cc6f163b8027d1330f4e5094e2d.tar.bz2 GT5-Unofficial-86f1765b171f4cc6f163b8027d1330f4e5094e2d.zip | |
Remove more reflection + reorganize mixin accessors packages (#3260)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gtnhlanth')
| -rw-r--r-- | src/main/java/gtnhlanth/common/hatch/MTEHatchBeamlineConnector.java | 11 | ||||
| -rw-r--r-- | src/main/java/gtnhlanth/loader/RecipeLoader.java | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/main/java/gtnhlanth/common/hatch/MTEHatchBeamlineConnector.java b/src/main/java/gtnhlanth/common/hatch/MTEHatchBeamlineConnector.java index 9e223ee9a1..a1e43ad174 100644 --- a/src/main/java/gtnhlanth/common/hatch/MTEHatchBeamlineConnector.java +++ b/src/main/java/gtnhlanth/common/hatch/MTEHatchBeamlineConnector.java @@ -4,16 +4,14 @@ import static net.minecraft.util.StatCollector.translateToLocalFormatted; import static tectech.util.CommonValues.MOVE_AT; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidStack; -import org.apache.commons.lang3.reflect.FieldUtils; - import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; +import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import gtnhlanth.common.beamline.IConnectsToBeamline; import tectech.mechanics.dataTransport.DataPacket; import tectech.util.TTUtility; @@ -76,11 +74,8 @@ public abstract class MTEHatchBeamlineConnector<T extends DataPacket> extends MT if (aBaseMetaTileEntity.isClientSide()) { return true; } - try { - EntityPlayerMP player = (EntityPlayerMP) aPlayer; - clientLocale = (String) FieldUtils.readField(player, "translator", true); - } catch (Exception e) { - clientLocale = "en_US"; + if (aPlayer instanceof EntityPlayerMPAccessor) { + clientLocale = ((EntityPlayerMPAccessor) aPlayer).gt5u$getTranslator(); } return true; } diff --git a/src/main/java/gtnhlanth/loader/RecipeLoader.java b/src/main/java/gtnhlanth/loader/RecipeLoader.java index 6eb4fc8c62..71d8eaa06c 100644 --- a/src/main/java/gtnhlanth/loader/RecipeLoader.java +++ b/src/main/java/gtnhlanth/loader/RecipeLoader.java @@ -138,7 +138,6 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TierEU; -import gregtech.api.interfaces.IRecipeMutableAccess; import gregtech.api.util.GTLog; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTOreDictUnificator; @@ -146,6 +145,7 @@ import gregtech.api.util.GTRecipe; import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.GTRecipeConstants; import gregtech.api.util.GTUtility; +import gregtech.mixin.interfaces.accessors.IRecipeMutableAccess; import gtnhlanth.Tags; import gtnhlanth.common.item.MaskList; import gtnhlanth.common.register.BotWerkstoffMaterialPool; |
