From 764e8d7daa7780e0c02a5f201250c0793203b0dc Mon Sep 17 00:00:00 2001 From: Brady Date: Tue, 18 Dec 2018 19:27:45 -0600 Subject: [PATCH] Add windowClick to IPlayerController --- src/api/java/baritone/api/utils/IPlayerController.java | 5 +++++ .../baritone/utils/player/PrimaryPlayerController.java | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/api/java/baritone/api/utils/IPlayerController.java b/src/api/java/baritone/api/utils/IPlayerController.java index bf987a06..8ecc7e11 100644 --- a/src/api/java/baritone/api/utils/IPlayerController.java +++ b/src/api/java/baritone/api/utils/IPlayerController.java @@ -17,6 +17,9 @@ package baritone.api.utils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ClickType; +import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.GameType; @@ -33,6 +36,8 @@ public interface IPlayerController { void resetBlockRemoving(); + ItemStack windowClick(int windowId, int slotId, int mouseButton, ClickType type, EntityPlayer player); + void setGameType(GameType type); GameType getGameType(); diff --git a/src/main/java/baritone/utils/player/PrimaryPlayerController.java b/src/main/java/baritone/utils/player/PrimaryPlayerController.java index 750d578c..fa4ced9d 100644 --- a/src/main/java/baritone/utils/player/PrimaryPlayerController.java +++ b/src/main/java/baritone/utils/player/PrimaryPlayerController.java @@ -19,6 +19,9 @@ package baritone.utils.player; import baritone.api.utils.IPlayerController; import baritone.utils.Helper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ClickType; +import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.GameType; @@ -46,6 +49,11 @@ public enum PrimaryPlayerController implements IPlayerController, Helper { mc.playerController.resetBlockRemoving(); } + @Override + public ItemStack windowClick(int windowId, int slotId, int mouseButton, ClickType type, EntityPlayer player) { + return mc.playerController.windowClick(windowId, slotId, mouseButton, type, player); + } + @Override public void setGameType(GameType type) { mc.playerController.setGameType(type);