本文整理汇总了Java中net.minecraft.client.gui.inventory.GuiCrafting类的典型用法代码示例。如果您正苦于以下问题:Java GuiCrafting类的具体用法?Java GuiCrafting怎么用?Java GuiCrafting使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GuiCrafting类属于net.minecraft.client.gui.inventory包,在下文中一共展示了GuiCrafting类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: displayGui
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的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.inventory.GuiCrafting; //导入依赖的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: displayGui
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的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));
}
}
示例4: getGridItem
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
public static ItemStack getGridItem(int nr) {
GuiContainer menu = (GuiContainer)getMenu();
Container slots = menu.inventorySlots;
if (menu instanceof GuiCrafting) {
return ((ContainerWorkbench)slots).craftMatrix.getStackInSlot(nr);
} else if (menu instanceof GuiInventory) {
return ((ContainerPlayer)slots).craftMatrix.getStackInSlot(nr);
}
return null;
}
示例5: getServerGuiElement
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
public Object getServerGuiElement(int iD, EntityPlayer player, World world, int x, int y, int z) {
if (iD == 20) {
return new GuiCrafting(player.inventory, world);
}
if (iD == 21) {
return new PlayerInventoryGUISurvival(player);
}
return null;
}
示例6: getClientGuiElement
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
if (ID == 20){
//System.out.println("Hello ClientGUI");
return new GuiCrafting(player.inventory, world);
}
//System.out.println("BYE ClientGUI");
return null;
}
示例7: getClientGuiElement
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
@Override
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z){
if(ID == 0)
return new GuiCrafting(player.inventory, world, x, y, z);
else if(ID == 1 && world.getTileEntity(x, y, z) instanceof TileEntityChestRidiculous)
return new GUILargeChest(player.inventory, (TileEntityChestRidiculous)(world.getTileEntity(x, y, z)));
return null;
}
示例8: handleTooltip
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
@ForgeSubscribe
public void handleTooltip(ItemTooltipEvent event)
{
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT && Minecraft.getMinecraft().currentScreen instanceof GuiCrafting)
{
GuiCrafting gui = (GuiCrafting) Minecraft.getMinecraft().currentScreen;
ItemStack stackInResult = (ItemStack) gui.inventorySlots.getSlot(0).getStack();
if (stackInResult != null && stackInResult.getItem() == event.itemStack.getItem())
event.toolTip.add("WARNING: Stored energy will be lost");
}
}
示例9: getGuiClass
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GuiCrafting.class;
}
示例10: isCraftingGUI
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
public static boolean isCraftingGUI(final GuiContainer gui) {
return gui.getClass() == GuiCrafting.class || (RecipeInfo.hasOverlayHandler(gui, "crafting") && RecipeInfo.getOverlayHandler(gui, "crafting").getClass() == DefaultOverlayHandler.class);
}
示例11: loadConfig
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
public void loadConfig() {
NEIPing.init();
if (ExtraUtils.drum != null) {
API.addSubset("Extra Common.Drums", (ItemFilter)new SubsetItemsNBT(Item.getItemFromBlock(ExtraUtils.drum)));
}
if (ExtraUtils.microBlocks != null) {
API.addSubset("Extra Common.Extra Microblocks", (ItemFilter)new SubsetItemsNBT(ExtraUtils.microBlocks));
}
if (ExtraUtils.colorBlockDataEnabled) {
API.addSubset("Extra Common.Colored Blocks", (ItemFilter)new SubsetBlockClass(BlockColor.class));
}
if (ExtraUtils.greenScreen != null) {
API.addSubset("Extra Common.Lapis Caelestis", (ItemFilter)new SubsetItems(new Item[] { Item.getItemFromBlock((Block)ExtraUtils.greenScreen) }));
}
if (ExtraUtils.cobblestoneCompr != null) {
API.addSubset("Extra Common.Compressed Blocks", (ItemFilter)new SubsetItems(new Item[] { Item.getItemFromBlock((Block)ExtraUtils.cobblestoneCompr) }));
}
if (ExtraUtils.decorative1Enabled || ExtraUtils.decorative2Enabled) {
API.addSubset("Extra Common.Decorative Blocks", (ItemFilter)new SubsetBlockClass(BlockDecoration.class));
}
if (ExtraUtils.generator2 != null) {
final SubsetItems s = new SubsetItems(new Item[] { Item.getItemFromBlock(ExtraUtils.generator2) });
if (ExtraUtils.generator3 != null) {
s.addItem(Item.getItemFromBlock(ExtraUtils.generator3));
}
API.addSubset("Extra Common.Higher Tier Generators", (ItemFilter)s);
}
for (final Matcher matcher : AdvancedNodeUpgrades.entryList) {
if (matcher != AdvancedNodeUpgrades.nullMatcher && matcher.type == Matcher.Type.ITEM && matcher.shouldAddToNEI() && matcher.isSelectable()) {
String localizedName = matcher.getLocalizedName();
localizedName = localizedName.replace(".exe", "");
localizedName = localizedName.replaceAll("\\.", "");
API.addSubset("Extra Filtering." + localizedName, (ItemFilter)new ItemFilterWrapper(matcher));
}
}
API.registerRecipeHandler((ICraftingHandler)new EnderConstructorHandler());
API.registerUsageHandler((IUsageHandler)new EnderConstructorHandler());
API.registerRecipeHandler((ICraftingHandler)new InfoHandler());
API.registerUsageHandler((IUsageHandler)new InfoHandler());
API.registerRecipeHandler((ICraftingHandler)new SoulHandler());
API.registerUsageHandler((IUsageHandler)new SoulHandler());
if (Loader.isModLoaded("ForgeMultipart")) {
API.registerRecipeHandler((ICraftingHandler)new FMPMicroBlocksHandler());
API.registerUsageHandler((IUsageHandler)new FMPMicroBlocksHandler());
API.registerRecipeHandler((ICraftingHandler)new MicroBlocksHandler());
API.registerUsageHandler((IUsageHandler)new MicroBlocksHandler());
API.registerGuiOverlayHandler((Class)GuiCrafting.class, (IOverlayHandler)new FMPMicroBlocksOverlayHandler(), "microblocks");
API.registerGuiOverlayHandler((Class)GuiInventory.class, (IOverlayHandler)new FMPMicroBlocksOverlayHandler(63, 20), "microblocks2x2");
}
if (ExtraUtils.colorBlockData != null) {
API.hideItem(new ItemStack(ExtraUtils.colorBlockData));
}
LogHelper.info("Added NEI integration", new Object[0]);
}
示例12: getGuiClass
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GuiCrafting.class;
}
示例13: displayGUIWorkbench
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
/**
* Displays the crafting GUI for a workbench.
*/
public void displayGUIWorkbench(int par1, int par2, int par3)
{
this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj, par1, par2, par3));
}
示例14: displayGUIWorkbench
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
public void displayGUIWorkbench(int p_71058_1_, int p_71058_2_, int p_71058_3_)
{
this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj, p_71058_1_, p_71058_2_, p_71058_3_));
}
示例15: func_71058_b
import net.minecraft.client.gui.inventory.GuiCrafting; //导入依赖的package包/类
public void func_71058_b(int p_71058_1_, int p_71058_2_, int p_71058_3_) {
this.field_71159_c.func_71373_a(new GuiCrafting(this.field_71071_by, this.field_70170_p, p_71058_1_, p_71058_2_, p_71058_3_));
}