本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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;
}
示例5: InsertCartridgeRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
public InsertCartridgeRecipe(ResourceLocation group, ItemStack result, ShapedPrimer primer) {
super(group, result, primer);
}
示例6: RemoveCartridgeRecipe
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
public RemoveCartridgeRecipe(ResourceLocation group, ItemStack result, ShapedPrimer primer) {
super(group, result, primer);
}
示例7: RecipeShapedFluid
import net.minecraftforge.common.crafting.CraftingHelper.ShapedPrimer; //导入依赖的package包/类
public RecipeShapedFluid(ResourceLocation loc, ItemStack result, ShapedPrimer primer)
{
super(loc, result, primer);
}
示例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));
}
示例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));
}