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