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


Java ForgeHooks.defaultRecipeGetRemainingItems方法代碼示例

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


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

示例1: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Nonnull
@Override
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv) {
	NonNullList<ItemStack> remainingItems = ForgeHooks.defaultRecipeGetRemainingItems(inv);

	ItemStack sword;
	for (int i = 0; i < inv.getSizeInventory(); i++) {
		ItemStack stack = inv.getStackInSlot(i);
		if (stack.getItem() == Items.GOLDEN_SWORD) {
			sword = stack.copy();
			sword.setItemDamage(sword.getItemDamage() + 1);
			if (sword.getItemDamage() > sword.getMaxDamage()) sword = null;
			if (sword != null) {
				remainingItems.set(i, sword);
			}
			break;
		}
	}

	return remainingItems;
}
 
開發者ID:TeamWizardry,項目名稱:Wizardry,代碼行數:22,代碼來源:RecipeJam.java

示例2: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv)
{
	NonNullList<ItemStack> remains = ForgeHooks.defaultRecipeGetRemainingItems(inv);
	for (int i = 0; i < height * width; i++)
	{
		ItemStack stack = inv.getStackInSlot(i);
		NonNullList<Ingredient> matchedIngredients = this.input;
		if (matchedIngredients.get(i) instanceof IngredientFluidStack)
		{
			if (!stack.isEmpty())
			{
				ItemStack copy = stack.copy();
				copy.setCount(1);
				remains.set(i, copy);
			}
			IFluidHandlerItem handler = FluidUtil.getFluidHandler(remains.get(i));
			if (handler != null)
			{
				FluidStack fluid = ((IngredientFluidStack) matchedIngredients.get(i)).getFluid();
				handler.drain(fluid.amount, true);
				remains.set(i, handler.getContainer());
			}
		}
	}
	return remains;
}
 
開發者ID:TeamWizardry,項目名稱:Wizardry,代碼行數:28,代碼來源:RecipeShapedFluid.java

示例3: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
    ItemStack[] remainingItems = new ItemStack[inv.getSizeInventory()];
    if (returnContainers) {
        remainingItems = ForgeHooks.defaultRecipeGetRemainingItems(inv);
    }

    return remainingItems;
}
 
開發者ID:droidicus,項目名稱:AquaRegia,代碼行數:10,代碼來源:ShapelessNBTRecipe.java

示例4: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public ItemStack[] getRemainingItems(InventoryCrafting ic) {

	return ForgeHooks.defaultRecipeGetRemainingItems(ic);
}
 
開發者ID:bafomdad,項目名稱:uniquecrops,代碼行數:6,代碼來源:DiscountBookRecipe.java

示例5: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public ItemStack[] getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers
{
    return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:6,代碼來源:ShapelessOreRecipe.java

示例6: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
	return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:5,代碼來源:RecipeWirelessChestMinecart.java

示例7: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers
{
    return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:6,代碼來源:ShapedOreCrystalRecipe.java

示例8: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv)
   {
       return ForgeHooks.defaultRecipeGetRemainingItems(inv);
   }
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:6,代碼來源:ShapelessCrystalRecipe.java

示例9: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Nonnull
@Override
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv) {
	return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:TeamWizardry,項目名稱:Wizardry,代碼行數:6,代碼來源:RecipePearl.java

示例10: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
@Nonnull
public ItemStack[] getRemainingItems(@Nonnull InventoryCrafting inv) {
	return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:yolp900,項目名稱:ItsJustaCharm1.10.2Dead,代碼行數:6,代碼來源:RingAttachmentRecipe.java

示例11: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
   @Nonnull
   public ItemStack[] getRemainingItems(@Nonnull InventoryCrafting inv) {
       ItemStack ring = null;
       for(int i = 0; i < inv.getSizeInventory(); i++) {
           ItemStack stack = inv.getStackInSlot(i);
           if (stack != null) {
               if (ring != null) {
                   return ForgeHooks.defaultRecipeGetRemainingItems(inv);
               }
               if (stack.getItem() instanceof IBauble) {
                   ring = stack.copy();
               } else {
                   return ForgeHooks.defaultRecipeGetRemainingItems(inv);
               }
           }
       }

       if (ring != null && NBTHelper.getBoolean(ring, IJCConstants.NBT.BAUBLE_HOLDER)) {
           ItemStack output = getCraftingResult(inv);
           if (output == null) {
               return ForgeHooks.defaultRecipeGetRemainingItems(inv);
           }
           if (output.getItem() instanceof ItemBaubleRingHolder) {
               NBTHelper.getTag(ring).removeTag(IJCConstants.NBT.BAUBLE_HOLDER);
               if (NBTHelper.getBoolean(ring, IJCConstants.NBT.ADVANCED_BAUBLE_HOLDER)) {
                   NBTHelper.getTag(ring).removeTag(IJCConstants.NBT.ADVANCED_BAUBLE_HOLDER);
               }
           } else {
			boolean advanced = NBTHelper.getBoolean(ring, IJCConstants.NBT.ADVANCED_BAUBLE_HOLDER);
			ItemStack ring0 = NBTHelper.getItemStack(ring, IJCConstants.NBT.BAUBLE_ATTACHED(0));
			if (ring0 == null) {
				return ForgeHooks.defaultRecipeGetRemainingItems(inv);
			}
			if (advanced) {
				ItemStack ring1 = NBTHelper.getItemStack(ring, IJCConstants.NBT.BAUBLE_ATTACHED(1));
				if (ring1 == null) {
					NBTHelper.getTag(ring).removeTag(IJCConstants.NBT.BAUBLE_ATTACHED(0));
				} else {
					NBTHelper.getTag(ring).removeTag(IJCConstants.NBT.BAUBLE_ATTACHED(1));
				}
			} else {
				NBTHelper.getTag(ring).removeTag(IJCConstants.NBT.BAUBLE_ATTACHED(0));
			}

           }
           inv.clear();
           return new ItemStack[] {ring};
       } else {
           return ForgeHooks.defaultRecipeGetRemainingItems(inv);
       }
}
 
開發者ID:yolp900,項目名稱:ItsJustaCharm1.10.2Dead,代碼行數:53,代碼來源:RingRemovalRecipe.java

示例12: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
@Nonnull
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv) {
    return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:CenturionFox,項目名稱:wolfarmor,代碼行數:6,代碼來源:RecipeWolfArmorDyes.java

示例13: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@NotNull
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
	return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:TeamWizardry,項目名稱:TMT-Refraction,代碼行數:6,代碼來源:RecipeScrewDriver.java

示例14: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
	return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:AshIndigo,項目名稱:Alloycraft,代碼行數:5,代碼來源:RecipeHandler.java

示例15: getRemainingItems

import net.minecraftforge.common.ForgeHooks; //導入方法依賴的package包/類
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) //getRecipeLeftovers
{
	return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
 
開發者ID:Deadrik,項目名稱:TFC2,代碼行數:6,代碼來源:ShapedOreRecipeTFC.java


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