Java 类net.minecraft.client.gui.inventory.GuiScreenHorseInventory 实例源码

项目:CrystalMod    文件:ClientEventHandler.java   
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event)
{
    GuiScreen gui = event.getGui();
    if(gui !=null && gui instanceof GuiScreenHorseInventory){
        GuiScreenHorseInventory horseGui = (GuiScreenHorseInventory)gui;
        EntityHorse horse = (EntityHorse)ReflectionUtils.getPrivateValue(horseGui, GuiScreenHorseInventory.class, ObfuscatedNames.GuiScreenHorseInventory_horseEntity);
        if(horse !=null && HorseAccessories.hasEnderChest(horse)){
            ContainerHorseChest animalchest = new ContainerHorseChest("HorseChest", 2);
            animalchest.setCustomName(horse.getName());
            event.setGui(new GuiHorseEnderChest(CrystalMod.proxy.getClientPlayer().inventory, animalchest, horse));
            PacketGuiMessage pkt = new PacketGuiMessage("Gui");
            pkt.setOpenGui(GuiHandler.GUI_ID_ENTITY, horse.getEntityId(), 0, 0);
            CrystalModNetwork.sendToServer(pkt);
        }
    }
}
项目:Cyclic    文件:EventGuiInvoButtons.java   
@SideOnly(value = Side.CLIENT)
@SubscribeEvent
public void guiPostInit(GuiScreenEvent.InitGuiEvent.Post event) {
  GuiScreen gui = event.getGui();
  boolean showInvToggle = false;
  boolean showCraftToggle = false;
  if (gui instanceof GuiInventory || gui instanceof GuiPlayerExtended
      || gui instanceof GuiPlayerExtWorkbench
      || gui instanceof GuiScreenHorseInventory) {
    // gui left and top are private, so are the sizes
    int xSize = 176;
    int ySize = 166;
    int guiLeft = (gui.width - xSize) / 2;
    int guiTop = (gui.height - ySize) / 2;
    int x = 44 + guiLeft;
    int y = guiTop;
    EntityPlayer player = Minecraft.getMinecraft().player;
    final IPlayerExtendedProperties data = CapabilityRegistry.getPlayerProperties(player);
    showInvToggle = data.hasInventoryExtended();// && !(gui instanceof GuiPlayerExtWorkbench);
    showCraftToggle = data.hasInventoryCrafting();// && !(gui instanceof GuiPlayerExtended);
    if (event.getButtonList() == null) {
      event.setButtonList(new ArrayList<GuiButton>());
    }
    if (showInvToggle) {
      event.getButtonList().add(new ButtonTabToggleInventory(gui, x, y));
    }
    if (showCraftToggle) {
      event.getButtonList().add(new ButtonTabToggleCrafting(gui, x - 17, y));//the 17 is width + 2
    }
  }
}
项目:DecompiledMinecraft    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse horse, IInventory horseInventory)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, horseInventory, horse));
}
项目:BaseClient    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse horse, IInventory horseInventory)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, horseInventory, horse));
}
项目:BaseClient    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse horse, IInventory horseInventory) {
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, horseInventory, horse));
}
项目:Zombe-Modpack    文件:EntityPlayerSP.java   
public void openGuiHorseInventory(AbstractHorse horse, IInventory inventoryIn)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, inventoryIn, horse));
}
项目:Backmemed    文件:EntityPlayerSP.java   
public void openGuiHorseInventory(AbstractHorse horse, IInventory inventoryIn)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, inventoryIn, horse));
}
项目:CustomWorldGen    文件:EntityPlayerSP.java   
public void openGuiHorseInventory(EntityHorse horse, IInventory inventoryIn)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, inventoryIn, horse));
}
项目:Resilience-Client-Source    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse par1EntityHorse, IInventory par2IInventory)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, par2IInventory, par1EntityHorse));
}
项目:ExpandedRailsMod    文件:EntityPlayerSP.java   
public void openGuiHorseInventory(EntityHorse horse, IInventory inventoryIn)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, inventoryIn, horse));
}
项目:Cauldron    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse p_110298_1_, IInventory p_110298_2_)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, p_110298_2_, p_110298_1_));
}
项目:Cauldron    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse p_110298_1_, IInventory p_110298_2_)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, p_110298_2_, p_110298_1_));
}
项目:RuneCraftery    文件:EntityPlayerSP.java   
public void func_110298_a(EntityHorse p_110298_1_, IInventory p_110298_2_) {
   this.field_71159_c.func_71373_a(new GuiScreenHorseInventory(this.field_71071_by, p_110298_2_, p_110298_1_));
}
项目:RuneCraftery    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse par1EntityHorse, IInventory par2IInventory)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, par2IInventory, par1EntityHorse));
}
项目:BetterNutritionMod    文件:EntityPlayerSP.java   
public void displayGUIHorse(EntityHorse par1EntityHorse, IInventory par2IInventory)
{
    this.mc.displayGuiScreen(new GuiScreenHorseInventory(this.inventory, par2IInventory, par1EntityHorse));
}