diff options
author | Jason Mitchell <mitchej@gmail.com> | 2023-05-06 08:13:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-06 17:13:45 +0200 |
commit | d945860185b888709300e28ae1c9db88799856c0 (patch) | |
tree | 0d7e2766c98164d6ae915c0e8a9d8f46c7ceb4e5 /src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | |
parent | f6e17a41972ba0afb6004a3d383be8d51eaee60e (diff) | |
download | GT5-Unofficial-d945860185b888709300e28ae1c9db88799856c0.tar.gz GT5-Unofficial-d945860185b888709300e28ae1c9db88799856c0.tar.bz2 GT5-Unofficial-d945860185b888709300e28ae1c9db88799856c0.zip |
Exploring some various ForgeDirection fixes (#1950)
* Fix mFacing NPEs
* Default facing fixes (#1945)
* QuickFixes incomplete facing fixes
* fix Neither UP nor DOWN conditions as offsetY == 0 is not valid test
* fix neither up nor down again
* Still not fixed: use ForgeDirection.flag for clarty
killed more ordinal siding.
* get ride of offset testing
---------
Co-authored-by: Jakub <53441451+kuba6000@users.noreply.github.com>
Co-authored-by: Jason Mitchell <mitchej@gmail.com>
* bit logic fix
* Fix single block machine facings
* Predict the machine facing direction clientside before the server packet arrives
* Fix isFacingValid logic
---------
Co-authored-by: Léa Gris <lea.gris@noiraude.net>
Co-authored-by: Jakub <53441451+kuba6000@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: Raven Szewczyk <git@eigenraven.me>
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index ceee423281..eda4f829b6 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -98,7 +98,7 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec private byte mColor = 0, oColor = 0, oStrongRedstone = 0, oRedstoneData = 63, oTextureData = 0, oUpdateData = 0, oTexturePage = 0; private byte oLightValueClient = 0, oLightValue = -1, mLightValue = 0, mOtherUpgrades = 0, mWorkData = 0; - private ForgeDirection mFacing, oFacing; + private ForgeDirection mFacing = ForgeDirection.DOWN, oFacing = ForgeDirection.DOWN; private int mDisplayErrorCode = 0, oX = 0, oY = 0, oZ = 0, mTimeStatisticsIndex = 0, mLagWarningCount = 0; private long oOutput = 0, mAcceptedAmperes = Long.MAX_VALUE; private long mLastCheckTick = 0; @@ -1558,13 +1558,12 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec yCoord, zCoord); } else if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) { - mStrongRedstone ^= (1 << tSide.ordinal()); + mStrongRedstone ^= tSide.flag; GT_Utility.sendChatToPlayer( aPlayer, GT_Utility.trans("091", "Redstone Output at Side ") + tSide + GT_Utility.trans("092", " set to: ") - + ((mStrongRedstone & (1 << tSide.ordinal())) != 0 - ? GT_Utility.trans("093", "Strong") + + ((mStrongRedstone & tSide.flag) != 0 ? GT_Utility.trans("093", "Strong") : GT_Utility.trans("094", "Weak"))); GT_Utility.sendSoundToPlayers( worldObj, |