diff options
| author | Sphyix <masifede2@gmail.com> | 2021-11-21 12:59:39 +0100 |
|---|---|---|
| committer | Sphyix <masifede2@gmail.com> | 2021-11-21 12:59:39 +0100 |
| commit | 2901426a3fbaee614e245bc3d7f68dce9b1fd4a6 (patch) | |
| tree | 5b7717983e0f53f94c1c67cb6d2186f452bb7e69 /src/main/java/gregtech/common/covers/GT_Cover_Arm.java | |
| parent | 8b9f24202072698748cad0b5f6d0b6c9f9ce2a42 (diff) | |
| parent | abeecd2da02c7d38cb1c5b6e2fd5517c6f8a994b (diff) | |
| download | GT5-Unofficial-2901426a3fbaee614e245bc3d7f68dce9b1fd4a6.tar.gz GT5-Unofficial-2901426a3fbaee614e245bc3d7f68dce9b1fd4a6.tar.bz2 GT5-Unofficial-2901426a3fbaee614e245bc3d7f68dce9b1fd4a6.zip | |
Merge branch 'experimental' of https://github.com/Sphyix/GT5-Unofficial into experimental
Diffstat (limited to 'src/main/java/gregtech/common/covers/GT_Cover_Arm.java')
| -rw-r--r-- | src/main/java/gregtech/common/covers/GT_Cover_Arm.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java index ed60929719..c64aaa16a1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -11,6 +11,7 @@ import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.net.GT_Packet_TileEntityCover; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; +import gregtech.api.util.ISerializableObject; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -111,6 +112,16 @@ public class GT_Cover_Arm extends GT_CoverBehavior { } @Override + protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + int step = (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) ? 1 : -1; + int tCoverVariable = getNewVar(aCoverVariable.get(), step); + sendMessageToPlayer(aPlayer, tCoverVariable); + aCoverVariable.set(tCoverVariable); + return true; + } + + @Override + @SuppressWarnings("deprecation") public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { int step = (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) ? 1 : -1; aCoverVariable = getNewVar(aCoverVariable, step); |
