當前位置: 首頁>>代碼示例>>Java>>正文


Java PositionedStack.setPermutationToRender方法代碼示例

本文整理匯總了Java中codechicken.nei.PositionedStack.setPermutationToRender方法的典型用法代碼示例。如果您正苦於以下問題:Java PositionedStack.setPermutationToRender方法的具體用法?Java PositionedStack.setPermutationToRender怎麽用?Java PositionedStack.setPermutationToRender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在codechicken.nei.PositionedStack的用法示例。


在下文中一共展示了PositionedStack.setPermutationToRender方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setIngredientPermutation

import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
/**
 * Set all variable ingredients to this permutation.
 *
 * @param ingredient
 */
public void setIngredientPermutation(Collection<PositionedStack> ingredients, ItemStack ingredient) {
    for (PositionedStack stack : ingredients) {
        for (int i = 0; i < stack.items.length; i++) {
            if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack.items[i])) {
                stack.item = stack.items[i];
                stack.item.setItemDamage(ingredient.getItemDamage());
                if (ingredient.hasTagCompound()) {
                    stack.item.setTagCompound((NBTTagCompound) ingredient.getTagCompound().copy());
                }
                stack.items = new ItemStack[]{stack.item};
                stack.setPermutationToRender(0);
                break;
            }
        }
    }
}
 
開發者ID:SneakyTactician,項目名稱:BIGB,代碼行數:22,代碼來源:TemplateRecipeHandler.java

示例2: getIngredients

import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
@Override
public List<PositionedStack> getIngredients() {
	if (randomPermutations)
		return getCycledIngredients(cycleticks / 20, ingredients);

	for (PositionedStack stack : ingredients)
		if (stack.items.length > 1)
			stack.setPermutationToRender(cycleticks / 20 % stack.items.length);
	return ingredients;
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:11,代碼來源:BannerPatternHandler.java

示例3: getIngredients

import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
@Override
public List<PositionedStack> getIngredients() {
    for (PositionedStack inputPositionStack: listInput)
        inputPositionStack.setPermutationToRender((cycleticks / 20) % inputPositionStack.items.length);
    listInput.addAll(listOutput);
    return listInput;
}
 
開發者ID:GWYOG,項目名稱:CustomNEIPlugins,代碼行數:8,代碼來源:PluginMachineRecipe.java

示例4: setIngredientPermutation

import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
/**
 * Set all variable ingredients to this permutation.
 *
 * @param ingredient
 */
public void setIngredientPermutation(Collection<PositionedStack> ingredients, ItemStack ingredient) {
    for (PositionedStack stack : ingredients) {
        for (int i = 0; i < stack.items.length; i++) {
            if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack.items[i])) {
                stack.item = stack.items[i];
                stack.item.setItemDamage(ingredient.getItemDamage());
                stack.items = new ItemStack[]{stack.item};
                stack.setPermutationToRender(0);
                break;
            }
        }
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:19,代碼來源:TemplateRecipeHandler.java

示例5: randomRenderPermutation

import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public void randomRenderPermutation(final PositionedStack stack, final long cycle) {
    stack.setPermutationToRender(0);
}
 
開發者ID:sameer,項目名稱:ExtraUtilities,代碼行數:4,代碼來源:MicroBlocksHandler.java

示例6: randomRenderPermutation

import codechicken.nei.PositionedStack; //導入方法依賴的package包/類
public void randomRenderPermutation(PositionedStack stack, long cycle) {
    Random rand = new Random(cycle + offset);
    stack.setPermutationToRender(Math.abs(rand.nextInt()) % stack.items.length);
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:5,代碼來源:TemplateRecipeHandler.java


注:本文中的codechicken.nei.PositionedStack.setPermutationToRender方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。