diff options
author | Jason Mitchell <mitchej@gmail.com> | 2023-04-22 22:33:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-23 07:33:35 +0200 |
commit | 56f2269f4af6d2130bdb2b6e6ac6e13bce89e47b (patch) | |
tree | 745e6d92025ec4ef449fc59fa5fdd741200b0489 /src/main/java/gregtech/api/events | |
parent | ac0b7a7da46646d325def36eed811941dbfc5950 (diff) | |
download | GT5-Unofficial-56f2269f4af6d2130bdb2b6e6ac6e13bce89e47b.tar.gz GT5-Unofficial-56f2269f4af6d2130bdb2b6e6ac6e13bce89e47b.tar.bz2 GT5-Unofficial-56f2269f4af6d2130bdb2b6e6ac6e13bce89e47b.zip |
Forge direction (#1895)
* ForgeDirection
Also refactor the clusterfuck that was `getCoordinateScan`
Co-authored by: Jason Mitchell <mitchej@gmail.com>
* Fix rendering of Frame Boxes
Frame boxes needed their own implementation of getTexture with int connexion mask,
which is returning an error texture for the MetaTileEntity, because pipes (FrameBox
**is** a pipe) do use this method to return different textures based on connexion
status.
---------
Co-authored-by: Léa Gris <lea.gris@noiraude.net>
Diffstat (limited to 'src/main/java/gregtech/api/events')
-rw-r--r-- | src/main/java/gregtech/api/events/BlockScanningEvent.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/events/BlockScanningEvent.java b/src/main/java/gregtech/api/events/BlockScanningEvent.java index 27eb375a6f..bc2a33bcea 100644 --- a/src/main/java/gregtech/api/events/BlockScanningEvent.java +++ b/src/main/java/gregtech/api/events/BlockScanningEvent.java @@ -6,6 +6,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.world.WorldEvent; import cpw.mods.fml.common.eventhandler.Cancelable; @@ -16,7 +17,7 @@ public class BlockScanningEvent extends WorldEvent { public final EntityPlayer mPlayer; public final int mX, mY, mZ, mScanLevel; public final ArrayList<String> mList; - public final byte mSide; + public final ForgeDirection mSide; public final float mClickX, mClickY, mClickZ; public final TileEntity mTileEntity; public final Block mBlock; @@ -26,15 +27,16 @@ public class BlockScanningEvent extends WorldEvent { */ public int mEUCost = 0; - public BlockScanningEvent(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, byte aSide, int aScanLevel, - Block aBlock, TileEntity aTileEntity, ArrayList<String> aList, float aClickX, float aClickY, float aClickZ) { + public BlockScanningEvent(World aWorld, EntityPlayer aPlayer, int aX, int aY, int aZ, ForgeDirection side, + int aScanLevel, Block aBlock, TileEntity aTileEntity, ArrayList<String> aList, float aClickX, float aClickY, + float aClickZ) { super(aWorld); mPlayer = aPlayer; mScanLevel = aScanLevel; mTileEntity = aTileEntity; mBlock = aBlock; mList = aList; - mSide = aSide; + mSide = side; mX = aX; mY = aY; mZ = aZ; |