本文整理汇总了Java中net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer类的典型用法代码示例。如果您正苦于以下问题:Java ShapedPrimer类的具体用法?Java ShapedPrimer怎么用?Java ShapedPrimer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShapedPrimer类属于net.minecraftforge.common.crafting.CraftingHelper包,在下文中一共展示了ShapedPrimer类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createExample
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
private static ShapedPrimer createExample() {
final ShapedPrimer example = new ShapedPrimer();
example.width = 3;
example.height = 3;
Ingredient e = Ingredient.fromStacks(MetasGeneric.mapMemory.newItemStack());
Ingredient m = Ingredient.fromStacks(ItemEmptyMap.createMap(Items.emptyMap, 0));
example.input = NonNullList.from(
Ingredient.EMPTY,
Ingredient.EMPTY, e, Ingredient.EMPTY,
e, m, e,
Ingredient.EMPTY, e, Ingredient.EMPTY);
return example;
}
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:17,代码来源:MapResizeRecipe.java
示例2: parse
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
@Override
public IRecipe parse(JsonContext context, JsonObject json) {
ShapedOreRecipe recipe = ShapedOreRecipe.factory(context, json);
ShapedPrimer primer = new ShapedPrimer();
primer.width = recipe.getWidth();
primer.height = recipe.getHeight();
primer.mirrored = JsonUtils.getBoolean(json, "mirrored", true);
primer.input = recipe.getIngredients();
return new InsertCartridgeRecipe(new ResourceLocation(MeeCreeps.MODID, "insert_cartridge_factory"), recipe.getRecipeOutput(), primer);
}
开发者ID:McJty,项目名称:MeeCreeps,代码行数:13,代码来源:InsertCartridgeFactory.java
示例3: parse
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
@Override
public IRecipe parse(JsonContext context, JsonObject json) {
ShapedOreRecipe recipe = ShapedOreRecipe.factory(context, json);
ShapedPrimer primer = new ShapedPrimer();
primer.width = recipe.getWidth();
primer.height = recipe.getHeight();
primer.mirrored = JsonUtils.getBoolean(json, "mirrored", true);
primer.input = recipe.getIngredients();
return new RemoveCartridgeRecipe(new ResourceLocation(MeeCreeps.MODID, "remove_cartridge_factory"), recipe.getRecipeOutput(), primer);
}
开发者ID:McJty,项目名称:MeeCreeps,代码行数:13,代码来源:RemoveCartridgeFactory.java
示例4: AddShapedRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
/**
* This should only be used for registering recipes for vanilla objects and not mod-specific objects.
* @param name The name of the recipe. ModID is pre-pended to it.
* @param stack The output of the recipe.
* @param recipeComponents The recipe components.
*/
public static ShapedRecipes AddShapedRecipe(String name, String groupName, ItemStack stack, Object... recipeComponents)
{
name = Prefab.MODID.toLowerCase().replace(' ', '_') + ":" + name;
ShapedPrimer primer = CraftingHelper.parseShaped(recipeComponents);
ShapedRecipes shapedrecipes = new ShapedRecipes(groupName, primer.width, primer.height, primer.input, stack);
shapedrecipes.setRegistryName(name);
ForgeRegistries.RECIPES.register(shapedrecipes);
return shapedrecipes;
}
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:18,代码来源:ModRegistry.java
示例5: InsertCartridgeRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
public InsertCartridgeRecipe(ResourceLocation group, ItemStack result, ShapedPrimer primer) {
super(group, result, primer);
}
开发者ID:McJty,项目名称:MeeCreeps,代码行数:4,代码来源:InsertCartridgeFactory.java
示例6: RemoveCartridgeRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
public RemoveCartridgeRecipe(ResourceLocation group, ItemStack result, ShapedPrimer primer) {
super(group, result, primer);
}
开发者ID:McJty,项目名称:MeeCreeps,代码行数:4,代码来源:RemoveCartridgeFactory.java
示例7: RecipeShapedFluid
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
public RecipeShapedFluid(ResourceLocation loc, ItemStack result, ShapedPrimer primer)
{
super(loc, result, primer);
}
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:5,代码来源:RecipeShapedFluid.java
示例8: addShapedRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
private void addShapedRecipe(IForgeRegistry<IRecipe> reg, ResourceLocation name, ResourceLocation group, @Nonnull ItemStack output, Object... params)
{
ShapedPrimer primer = CraftingHelper.parseShaped(params);
reg.register(new ShapedRecipes(group == null ? "" : group.toString(), primer.width, primer.height, primer.input, output).setRegistryName(name));
}
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:6,代码来源:MiscHandler.java
示例9: addShapedNBTRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
private void addShapedNBTRecipe(IForgeRegistry<IRecipe> reg, ResourceLocation name, ResourceLocation group, @Nonnull ItemStack output, Object... params)
{
ShapedPrimer primer = CraftingHelper.parseShaped(params);
reg.register(new ShapedNBTRecipe(group == null ? "" : group.toString(), primer.width, primer.height, primer.input, output).setRegistryName(name));
}
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:6,代码来源:MiscHandler.java
注:本文中的net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论