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


Java CraftingInventory类代码示例

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


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

示例1: match

import ethanjones.cubes.item.inv.CraftingInventory; //导入依赖的package包/类
public static ItemStack match(CraftingInventory inventory) {
  for (CraftingRecipe craftingRecipe : crafting_manager.list) {
    ItemStack stack = craftingRecipe.match(inventory);
    if (stack != null) return stack.copy();
  }
  return null;
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:8,代码来源:CraftingManager.java

示例2: match

import ethanjones.cubes.item.inv.CraftingInventory; //导入依赖的package包/类
public ItemStack match(CraftingInventory inventory) {
  ItemStack[] itemStacks = inventory.itemStacks;
  boolean[][] pattern = patterns[input.length];

  
  for (boolean[] p : pattern) {
    int j = 0;
    for (int i = 0; i < 9; i++) {
      ItemStack stack = itemStacks[i];
      if (p[i]) {
        CraftingInput ci = input[j++];
        if (ci == null) {
          if (stack == null) {
            continue;
          }
          continue;
        } else if (ci.matches(stack)) {
          continue;
        }
        continue;
      } else {
        if (stack != null) continue;
      }
    }
    return output;
  }
  return null;
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:29,代码来源:CraftingRecipe.java

示例3: match

import ethanjones.cubes.item.inv.CraftingInventory; //导入依赖的package包/类
public static ItemStack match(CraftingInventory inventory) {
  for (CraftingRecipe craftingRecipe : list) {
    ItemStack stack = craftingRecipe.match(inventory);
    if (stack != null) return stack.copy();
  }
  return null;
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:8,代码来源:CraftingManager.java

示例4: match

import ethanjones.cubes.item.inv.CraftingInventory; //导入依赖的package包/类
public ItemStack match(CraftingInventory inventory) {
  ItemStack[] itemStacks = inventory.itemStacks;
  boolean[][] pattern = patterns[input.length];

  patternLoop:
  for (boolean[] p : pattern) {
    int j = 0;
    for (int i = 0; i < 9; i++) {
      ItemStack stack = itemStacks[i];
      if (p[i]) {
        CraftingInput ci = input[j++];
        if (ci == null) {
          if (stack == null) {
            continue;
          }
          continue patternLoop;
        } else if (ci.matches(stack)) {
          continue;
        }
        continue patternLoop;
      } else {
        if (stack != null) continue patternLoop;
      }
    }
    return output;
  }
  return null;
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:29,代码来源:CraftingRecipe.java

示例5: CraftingInventoryActor

import ethanjones.cubes.item.inv.CraftingInventory; //导入依赖的package包/类
public CraftingInventoryActor(boolean name) {
	c = new CraftingInventory();
	defaults().space(4f);

	if (name) {
		add(new Label(c.getDisplayName(), new LabelStyle(Fonts.hud, Color.WHITE))).colspan(9);
		row();
	}

	add().uniform();
	add().uniform();
	add(s(0)).uniform();
	add(s(1)).uniform();
	add(s(2)).uniform();
	add().uniform();
	add().uniform();
	add().uniform();
	add().uniform();
	row();

	add().uniform();
	add().uniform();
	add(s(3)).uniform();
	add(s(4)).uniform();
	add(s(5)).uniform();
	add().uniform();
	add(new SlotActor(c.output, 0)).uniform();
	add().uniform();
	add().uniform();
	row();

	add().uniform();
	add().uniform();
	add(s(6)).uniform();
	add(s(7)).uniform();
	add(s(8)).uniform();
	add().uniform();
	add().uniform();
	add().uniform();
	add().uniform();
	row();

	pack();
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:45,代码来源:CraftingInventoryActor.java

示例6: CraftingInventoryActor

import ethanjones.cubes.item.inv.CraftingInventory; //导入依赖的package包/类
public CraftingInventoryActor(boolean name) {
  c = new CraftingInventory();
  defaults().space(4f);

  if (name) {
    add(new Label(c.getDisplayName(), new LabelStyle(Fonts.hud, Color.WHITE))).colspan(9);
    row();
  }

  add().uniform();
  add().uniform();
  add(s(0)).uniform();
  add(s(1)).uniform();
  add(s(2)).uniform();
  add().uniform();
  add().uniform();
  add().uniform();
  add().uniform();
  row();

  add().uniform();
  add().uniform();
  add(s(3)).uniform();
  add(s(4)).uniform();
  add(s(5)).uniform();
  add().uniform();
  add(new SlotActor(c.output, 0)).uniform();
  add().uniform();
  add().uniform();
  row();

  add().uniform();
  add().uniform();
  add(s(6)).uniform();
  add(s(7)).uniform();
  add(s(8)).uniform();
  add().uniform();
  add().uniform();
  add().uniform();
  add().uniform();
  row();

  pack();
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:45,代码来源:CraftingInventoryActor.java


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