本文整理汇总了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));
}
}
示例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));
}
}
示例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"));
}
示例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);
}
}
}
示例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));
}
}
示例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;
}
示例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;
}
示例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;
}
}
}
示例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);
}
}
示例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));
}
示例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_));
}
示例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_));
}