当前位置: 首页>>代码示例>>Java>>正文


Java GuiRepair类代码示例

本文整理汇总了Java中net.minecraft.client.gui.GuiRepair的典型用法代码示例。如果您正苦于以下问题:Java GuiRepair类的具体用法?Java GuiRepair怎么用?Java GuiRepair使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GuiRepair类属于net.minecraft.client.gui包,在下文中一共展示了GuiRepair类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: displayGui

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:EntityPlayerSP.java

示例2: displayGui

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.world));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.world, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.world));
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:18,代码来源:EntityPlayerSP.java

示例3: onTick

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
@Override
public void onTick() {
	if (this.repairGuiTask==null||!(this.repairGuiTask instanceof GuiRepair))
		return;
	final EntryId entryId = CurrentMode.instance.getEntryId();
	if (!entryId.isNameable())
		return;
	try {
		final GuiTextField textField = guiRepairTextField.get(this.repairGuiTask);
		final ContainerRepair containerRepair = guiRepairContainer.get(this.repairGuiTask);
		if (textField!=null&&containerRepair!=null) {
			final String text = textField.getText();
			if (!StringUtils.isEmpty(text)&&!StringUtils.equals(this.repairGuiTextFieldCache, text)) {
				final String name = entryId.id();
				Sign.setRepairName(name, textField, containerRepair);
				this.repairGuiTextFieldCache = name;
			}
		}
		return;
	} catch (final Exception e) {
		Log.notice(I18n.format("signpic.chat.error.place"));
	}
	Log.notice(I18n.format("signpic.chat.error.place"));
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:25,代码来源:AnvilHandler.java

示例4: onDraw

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
@Override
public void onDraw(final @Nullable GuiScreen gui) {
	if (gui instanceof GuiRepair&&this.repairGuiTask!=null) {
		final int xSize = 176;
		final int ySize = 166;
		final int guiLeft = (gui.width-xSize)/2;
		final int guiTop = (gui.height-ySize)/2;
		OpenGL.glColor4f(1f, 1f, 1f, 1f);
		WRenderer.startTexture();
		WRenderer.texture().bindTexture(MPanel.background);
		final Area a = Area.abs(guiLeft-42, guiTop, guiLeft, guiTop+49);
		MPanel.drawBack(a);
		WRenderer.texture().bindTexture(SignPicLabel.defaultTexture);
		WGui.drawTexture(Area.size(guiLeft-42, guiTop+3, 42, 42), null, null);
		if (CurrentMode.instance.isShortening()) {
			final Area b = Area.abs(guiLeft, guiTop-20, gui.width-guiLeft, guiTop);
			OpenGL.glColor4f(1f, 1f, 1f, this.o.get());
			WGui.drawString(I18n.format("signpic.gui.notice.shortening"), b, WGui.Align.CENTER, WGui.VerticalAlign.MIDDLE, true);
		}
	}
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:22,代码来源:AnvilHandler.java

示例5: displayGui

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
public void displayGui(IInteractionObject guiOwner) {
	String s = guiOwner.getGuiID();

	if ("minecraft:crafting_table".equals(s)) {
		this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
	} else if ("minecraft:enchanting_table".equals(s)) {
		this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
	} else if ("minecraft:anvil".equals(s)) {
		this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:EntityPlayerSP.java

示例6: GuiAnvil

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
public GuiAnvil(EntityPlayer player, World world, int x, int y, int z) {
	super(player.inventory, world, x, y, z);

	ContainerAnvil container = new ContainerAnvil(player, world, x, y, z);
	ReflectionHelper.setPrivateValue(GuiRepair.class, this, container, "field_147092_v");
	inventorySlots = container;
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:8,代码来源:GuiAnvil.java

示例7: onOpen

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
@Override
public boolean onOpen(final @Nullable GuiScreen gui, final @Nonnull EntryId currentId) {
	if (gui instanceof GuiRepair) {
		this.repairGuiTask = (GuiRepair) gui;
		return true;
	}
	return false;
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:9,代码来源:AnvilHandler.java

示例8: onButtonPress

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onButtonPress(ActionPerformedEvent.Pre e) {
    if (e.gui instanceof GuiRepair) {
        final GuiRepair repair = (GuiRepair)e.gui;

        switch(e.button.id) {
            //TODO
            //
            default:
                break;
        }
    }
}
 
开发者ID:vdvman1,项目名称:betterAnvil-forge,代码行数:15,代码来源:EventHandlerBA.java

示例9: addButtons

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void addButtons(InitGuiEvent.Post e) {
    if (e.gui instanceof GuiRepair) {
        final List<GuiButton> list = new ArrayList<GuiButton>();
        //TODO Add buttons.



        e.buttonList.addAll(list);
    }
}
 
开发者ID:vdvman1,项目名称:betterAnvil-forge,代码行数:13,代码来源:EventHandlerBA.java

示例10: displayGUIAnvil

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
/**
 * Displays the GUI for interacting with an anvil.
 */
public void displayGUIAnvil(int par1, int par2, int par3)
{
    this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj, par1, par2, par3));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:8,代码来源:EntityPlayerSP.java

示例11: displayGUIAnvil

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
public void displayGUIAnvil(int p_82244_1_, int p_82244_2_, int p_82244_3_)
{
    this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj, p_82244_1_, p_82244_2_, p_82244_3_));
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:5,代码来源:EntityPlayerSP.java

示例12: func_82244_d

import net.minecraft.client.gui.GuiRepair; //导入依赖的package包/类
public void func_82244_d(int p_82244_1_, int p_82244_2_, int p_82244_3_) {
   this.field_71159_c.func_71373_a(new GuiRepair(this.field_71071_by, this.field_70170_p, p_82244_1_, p_82244_2_, p_82244_3_));
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:4,代码来源:EntityPlayerSP.java


注:本文中的net.minecraft.client.gui.GuiRepair类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。