当前位置: 首页>>代码示例>>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;未经允许,请勿转载。