Add windowClick to IPlayerController

This commit is contained in:
Brady 2018-12-18 19:27:45 -06:00
parent 18f5c129a4
commit 764e8d7daa
No known key found for this signature in database
GPG Key ID: 73A788379A197567
2 changed files with 13 additions and 0 deletions

View File

@ -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();

View File

@ -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);