本文整理匯總了Java中codechicken.nei.PositionedStack.setMaxSize方法的典型用法代碼示例。如果您正苦於以下問題:Java PositionedStack.setMaxSize方法的具體用法?Java PositionedStack.setMaxSize怎麽用?Java PositionedStack.setMaxSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類codechicken.nei.PositionedStack
的用法示例。
在下文中一共展示了PositionedStack.setMaxSize方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CachedPatternRecipe
import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public CachedPatternRecipe(EnumBannerPattern pattern, String[] grid, List<Object> inputs) {
this.pattern = pattern;
for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++) {
char c = grid[y].charAt(x);
if (c != ' ') {
Object input = inputs.get(inputs.indexOf(c) + 1);
if (input instanceof String)
input = OreDictionary.getOres((String) input);
PositionedStack stack = new PositionedStack(input, 25 + x * 18, 6 + y * 18);
stack.setMaxSize(1);
ingredients.add(stack);
}
}
}
示例2: setIngredients
import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public void setIngredients(List<?> items) {
ingredients.clear();
for (int i = 0; i < items.size(); i++) {
PositionedStack stack = new PositionedStack(NeiLotrUtil.extractRecipeItems(items.get(i)),
25 + STACKORDER[i][0] * 18, 6 + STACKORDER[i][1] * 18);
stack.setMaxSize(1);
ingredients.add(stack);
}
}
示例3: setIngredients
import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public void setIngredients(List<?> items) {
ingredients.clear();
for (int ingred = 0; ingred < items.size(); ingred++) {
PositionedStack stack = new PositionedStack(items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
stack.setMaxSize(1);
ingredients.add(stack);
}
}
示例4: setIngredients
import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
/**
* @param width
* @param height
* @param items an ItemStack[] or ItemStack[][]
*/
public void setIngredients(int width, int height, Object[] items) {
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
if (items[y * width + x] == null)
continue;
PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18, false);
stack.setMaxSize(1);
ingredients.add(stack);
}
}
}
示例5: setIngredients
import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public void setIngredients(List<?> items) {
ingredients.clear();
for (int x = 0; x < items.size(); x++) {
PositionedStack stack = new PositionedStack(items.get(x), 25 + stackorder[x][0] * 18, 6 + stackorder[x][1] * 18);
stack.setMaxSize(1);
ingredients.add(stack);
}
}
示例6: setIngredients
import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public void setIngredients(int width, int height, Object[] items) {
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
if (items[y * width + x] == null) continue;
PositionedStack stack = new PositionedStack(items[y * width + x], 25 + x * 18, 6 + y * 18);
stack.setMaxSize(1);
ingredients.add(stack);
}
}
}