- 7
- 0
commands:
@Override
public void processCommand(ICommandSender sender, String[] args) {
World world = sender.getEntityWorld();
EntityPlayer entityPlayer = (EntityPlayer) sender;
if (!world.isRemote){
if (args[0].equals("kit")){
sender.addChatMessage(new ChatComponentText("ssssssssss: " + sender.getCommandSenderName()));
entityPlayer.openGui(ExampleMod.instance, GUI.GUI_ID,world,150,150,150);
}
}
}
// попытка открыть gui
сам клалсс gui:
public class GUI extends GuiScreen {
int guiWidth = 785;
int guiHeight = 550;
public static int GUI_ID = 0;
@Override
public void drawScreen(int x, int y, float ticks) {
int guiX = (width - guiWidth) / 4;
int guiY = (height - guiHeight) / 4;
GL11.glColor4f(1, 1, 1, 1);
drawDefaultBackground();
// mc.renderEngine.bindTexture(new ResourceLocation(ExampleMod.MODID, "textures/gui/GuiMap.png"));
drawTexturedModalRect(guiX, guiY, 0, 0, guiWidth, guiHeight);
super.drawScreen(x, y, ticks);
}
}
Киньте пожалуйста туториал может ,либо ещё чёт где можно что-либо посмотреть на тему gui screen .
Мне нужно просто на фоне нарисовать background