2018-08-01 17:10:48 +00:00
|
|
|
package baritone.bot.utils;
|
|
|
|
|
|
|
|
import net.minecraft.client.Minecraft;
|
2018-08-02 07:12:51 +00:00
|
|
|
import net.minecraft.client.entity.EntityPlayerSP;
|
|
|
|
import net.minecraft.client.multiplayer.WorldClient;
|
2018-08-02 14:01:34 +00:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2018-08-06 04:42:17 +00:00
|
|
|
import net.minecraft.util.math.Vec3d;
|
2018-08-05 23:56:21 +00:00
|
|
|
import net.minecraft.util.text.TextComponentString;
|
2018-08-01 17:10:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Brady
|
|
|
|
* @since 8/1/2018 12:18 AM
|
|
|
|
*/
|
|
|
|
public interface Helper {
|
|
|
|
|
|
|
|
Minecraft mc = Minecraft.getMinecraft();
|
2018-08-02 07:12:51 +00:00
|
|
|
|
2018-08-04 18:49:52 +00:00
|
|
|
default EntityPlayerSP player() {
|
|
|
|
return mc.player;
|
|
|
|
}
|
|
|
|
|
2018-08-05 23:41:57 +00:00
|
|
|
default WorldClient world() {
|
2018-08-04 18:49:52 +00:00
|
|
|
return mc.world;
|
|
|
|
}
|
|
|
|
|
2018-08-02 14:01:34 +00:00
|
|
|
default BlockPos playerFeet() {
|
2018-08-02 21:19:49 +00:00
|
|
|
return new BlockPos(mc.player.posX, mc.player.posY, mc.player.posZ);
|
2018-08-02 14:01:34 +00:00
|
|
|
}
|
|
|
|
|
2018-08-06 04:42:17 +00:00
|
|
|
default Vec3d playerHead() {
|
|
|
|
return new Vec3d(mc.player.posX, mc.player.posY + mc.player.getEyeHeight(), mc.player.posZ);
|
|
|
|
}
|
|
|
|
|
2018-08-05 23:56:21 +00:00
|
|
|
default void displayChatMessageRaw(String message) {
|
|
|
|
mc.ingameGUI.getChatGUI().printChatMessage(new TextComponentString(message));
|
|
|
|
}
|
2018-08-01 17:10:48 +00:00
|
|
|
}
|