本文整理汇总了Java中forestry.api.recipes.RecipeManagers类的典型用法代码示例。如果您正苦于以下问题:Java RecipeManagers类的具体用法?Java RecipeManagers怎么用?Java RecipeManagers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RecipeManagers类属于forestry.api.recipes包,在下文中一共展示了RecipeManagers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addSaplingRecipes
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
@Method(modid = MOD_ID)
private static void addSaplingRecipes()
{
TheMod.logger().info("Adding sapling recipes to Forestry's fermenter.");
final int fermentationValue = ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.sapling");
for (final OverworldTreeSpecies tree : OverworldTreeSpecies.values())
{
//noinspection ObjectAllocationInLoop
final ItemStack sapling = new ItemStack(tree.saplingBlock(), 1, tree.saplingSubBlockIndex());
RecipeManagers.fermenterManager
.addRecipe(sapling, fermentationValue, 1.0f, fluidStack("biomass"), fluidStack("water"));
RecipeManagers.fermenterManager
.addRecipe(sapling, fermentationValue, 1.5f, fluidStack("biomass"), fluidStack("juice"));
RecipeManagers.fermenterManager
.addRecipe(sapling, fermentationValue, 1.5f, fluidStack("biomass"), fluidStack("honey"));
}
}
示例2: preInit
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
@Override
public void preInit() {
super.preInit();
// Init carpenter manager
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager();
// Init moistener manager
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager();
// Init centrifuge manager
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager();
// Init still manager
RecipeManagers.stillManager = new MachineStill.RecipeManager();
// Init bottler manager
RecipeManagers.bottlerManager = new MachineBottler.RecipeManager();
// Init squeezer manager
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager();
// Init fermenter manager
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager();
// Init fabricator manager
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager();
}
示例3: injectLeveledRecipe
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
public static void injectLeveledRecipe(ItemStack resource, int fermentationValue, ItemStack outputItem) {
if (RecipeManagers.fermenterManager == null)
return;
if (!Config.invalidFingerprint) {
RecipeManagers.fermenterManager.addRecipe(resource, fermentationValue, 1.0f, new LiquidStack(outputItem.itemID, 1, outputItem.getItemDamage()),
new LiquidStack(Block.waterStill, 1));
if (ForestryItem.liquidJuice != null) {
RecipeManagers.fermenterManager.addRecipe(resource, fermentationValue, 1.5f, new LiquidStack(outputItem.itemID, 1, outputItem.getItemDamage()),
new LiquidStack(ForestryItem.liquidJuice, 1));
}
if (ForestryItem.liquidHoney != null) {
RecipeManagers.fermenterManager.addRecipe(resource, fermentationValue, 1.5f, new LiquidStack(outputItem.itemID, 1, outputItem.getItemDamage()),
new LiquidStack(ForestryItem.liquidHoney, 1));
}
} else {
RecipeManagers.fermenterManager.addRecipe(resource, fermentationValue, 0.5f, new LiquidStack(outputItem.itemID, 1, outputItem.getItemDamage()),
new LiquidStack(Block.lavaStill, 1));
}
}
示例4: injectLiquidContainer
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
public static void injectLiquidContainer(LiquidContainerData container, ItemStack remnant, int chance) {
LiquidContainerRegistry.registerLiquid(container);
if (RecipeManagers.squeezerManager != null) {
if (!container.container.getItem().hasContainerItem())
if (remnant != null) {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] { container.filled }, container.stillLiquid, remnant, chance);
} else {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] { container.filled }, container.stillLiquid);
}
}
if (RecipeManagers.bottlerManager != null) {
RecipeManagers.bottlerManager.addRecipe(5, container.stillLiquid, container.container, container.filled);
}
}
示例5: initLiquidContainers
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
private void initLiquidContainers() {
emptyCell = Items.getItem("cell");
lavaCell = Items.getItem("lavaCell");
waterCell = Items.getItem("waterCell");
if (emptyCell == null || lavaCell == null || waterCell == null) {
Proxies.log.fine("Any of the following IC2 items could not be found: empty cell, water cell, lava cell. Skipped adding IC2 liquid containers.");
return;
}
LiquidHelper.injectTinContainer(new LiquidContainerData(new LiquidStack(Block.lavaStill, Defaults.BUCKET_VOLUME), lavaCell, emptyCell));
LiquidHelper.injectTinContainer(new LiquidContainerData(new LiquidStack(Block.waterStill, Defaults.BUCKET_VOLUME), waterCell, emptyCell));
Proxies.common
.addRecipe(new ItemStack(ForestryBlock.soil, 8, 1),
new Object[] { "#Y#", "YXY", "#Y#", Character.valueOf('#'), Block.dirt, Character.valueOf('X'), waterCell, Character.valueOf('Y'),
Block.sand });
// Add extra recipes
RecipeManagers.bottlerManager.addRecipe(5, new LiquidStack(Block.waterStill, Defaults.BUCKET_VOLUME), emptyCell, waterCell);
RecipeManagers.bottlerManager.addRecipe(5, new LiquidStack(Block.lavaStill, Defaults.BUCKET_VOLUME), emptyCell, lavaCell);
}
示例6: registerMixingRecipe
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
protected void registerMixingRecipe(Object[] inputs, FluidStack additive, FluidStack additive2,
ItemStack output, Condition condition, Set<ItemStack> catalyst)
{
if (inputs.length > 9) {
return;
}
if (additive2 != null) {
return;
}
if (catalyst != null) {
return;
}
int time = 5 + (condition.temperature / Constants.STANDARD_TEMPERATURE - 1) * 100;
Object[] ingredients = ingredientsForInputs(inputs);
RecipeManagers.carpenterManager.addRecipe(time, additive, null, output, ingredients);
}
示例7: addBackpack
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
public static void addBackpack(final IForgeRegistry<Item> registry) {
if (ExtendedConfig.enableForestryBackpacks) {
BackpackManager.backpackInterface.registerBackpackDefinition(BACKPACK_UID, new UndertakerBackpack());
backpackItemT1 = BackpackManager.backpackInterface.createBackpack(BACKPACK_UID, EnumBackpackType.NORMAL);
backpackItemT1.setCreativeTab(GSTabs.otherItemsTab);
backpackItemT1.setRegistryName(ModInfo.ID, "gs_undertaker_backpack");
backpackItemT1.setUnlocalizedName("backpack.undertaker.t1");
backpackItemT2 = BackpackManager.backpackInterface.createBackpack(BACKPACK_UID, EnumBackpackType.WOVEN);
backpackItemT2.setCreativeTab(GSTabs.otherItemsTab);
backpackItemT2.setRegistryName(ModInfo.ID, "gs_undertaker_backpack_woven");
backpackItemT2.setUnlocalizedName("backpack.undertaker.t2");
GSRecipes.addForestryBackpack(new ItemStack(backpackItemT1), GSItem.CHISEL);
ItemStack silk = GameRegistry.makeItemStack("forestry:crafting_material", 3, 1, "");
if (!silk.isEmpty()) {
ItemStack backpackStackT2 = new ItemStack(backpackItemT2);
RecipeManagers.carpenterManager.addRecipe(200, FluidRegistry.getFluidStack("water", 1000), ItemStack.EMPTY, backpackStackT2,
new Object[]{
"sds", "sbs", "sss",
'd', Items.DIAMOND,
'b', backpackItemT1,
's', silk
}
);
}
registry.registerAll(CompatibilityForestry.backpackItemT1, CompatibilityForestry.backpackItemT2);
}
}
示例8: apply
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
@Override
public void apply()
{
if(byProduct == null)
RecipeManagers.squeezerManager.addRecipe(tickcount, inputStacks, outputFluid);
else
RecipeManagers.squeezerManager.addRecipe(tickcount, inputStacks, outputFluid, byProduct, chance);
}
示例9: registerLiquidContainer
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
private static void registerLiquidContainer(ItemCapsule baseCapsule) {
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
ItemStack filled;
FluidStack liquid = null;
for (FluidType fluidType : FluidType.values()) {
switch (fluidType) {
case EMPTY:
liquid = null;
break;
case WATER:
liquid = new FluidStack(FluidRegistry.WATER, baseCapsule.getType().capacity);
break;
case LAVA:
liquid = new FluidStack(FluidRegistry.LAVA, baseCapsule.getType().capacity);
break;
default:
liquid = FluidRegistry.getFluidStack(fluidType.liquidID, baseCapsule.getType().capacity);
break;
}
if (liquid != null) {
filled = new ItemStack(baseCapsule, 1, fluidType.ordinal());
FluidContainerRegistry.registerFluidContainer(liquid, filled, empty);
// Register with Squeezer/Bottler
//RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled); Outdated?
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] { filled }, liquid,
Config.wax.getStackForType(WaxType.MAGIC), 20);
fluidType.available = true;
}
}
// Empty will be set to unavailable. Obviously, it always is.
FluidType.EMPTY.available = true;
}
示例10: init
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
@Override
public void init() {
for (ItemCropProduct.ProductType product : ItemCropProduct.ProductType.values()) {
int amount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed");
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(ModItems.CROP_SEEDS, 1, product.getMetadata()), Fluids.SEED_OIL.getFluid(amount));
}
for (ItemModMeatFood.MeatType type : ItemModMeatFood.MeatType.values()) {
addToHunterBackpack(new ItemStack(ModItems.MEAT, 1, type.getMetadata()));
addToHunterBackpack(new ItemStack(ModItems.COOKED_MEAT, 1, type.getMetadata()));
}
addToHunterBackpack(new ItemStack(ModItems.GENERAL, 1, ItemGeneral.Type.CALF_BELLY.getMetadata()));
}
示例11: initRubberChain
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
private void initRubberChain() {
treetap = Items.getItem("treetap");
resin = Items.getItem("resin");
rubberwood = Items.getItem("rubberWood");
rubbersapling = Items.getItem("rubberSapling");
rubberleaves = Items.getItem("rubberLeaves");
fuelcanFilled = Items.getItem("filledFuelCan");
fuelcanEmpty = Items.getItem("fuelCan");
if (treetap == null || resin == null || rubberwood == null || rubbersapling == null || rubberleaves == null || fuelcanFilled == null
|| fuelcanEmpty == null) {
Proxies.log.fine("Any of the following IC2 blocks and items could not be found: resin, rubber wood, saplings or leaves, filled fuel cans, empty fuel cans. Skipped adding rubber chain.");
return;
}
// Add crop provider
CropProviders.arborealCrops.add(new CropProviderRubber());
// Add extra recipes
RecipeManagers.centrifugeManager.addRecipe(20, new ItemStack(ForestryItem.propolis), resin);
ItemStack fuelcanStack = new ItemStack(fuelcanFilled.itemID, 1, 0);
NBTTagCompound compound = new NBTTagCompound();
compound.setInteger("value", 15288);
fuelcanStack.setTagCompound(compound);
RecipeManagers.bottlerManager.addRecipe(20, new LiquidStack(ForestryItem.liquidBiofuel, Defaults.BOTTLER_FUELCAN_VOLUME), fuelcanEmpty, fuelcanStack);
RecipeUtil.injectLeveledRecipe(rubbersapling, GameMode.getGameMode().getFermentedPerSapling(), new ItemStack(ForestryItem.liquidBiomass));
// Add backpack items
BackpackManager.backpackItems[2].add(rubbersapling);
BackpackManager.backpackItems[2].add(rubberleaves);
// Rubber wood is added via ore dictionary.
}
示例12: registerMechanicalSeparationRecipe
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
@Override
public void registerMechanicalSeparationRecipe(ItemStack input, List<ChanceStack> outputs) {
Map<ItemStack,Float> map = new HashMap<ItemStack, Float>();
for (ChanceStack output : outputs) {
map.put(output.itemStack, output.chance);
}
int time = outputs.size() * 5;
RecipeManagers.centrifugeManager.addRecipe(time, input, map);
}
示例13: init
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
@Override
public void init(){
PneumaticRegistry.getInstance().registerFuel(FluidRegistry.getFluid("biomass"), 500000);
PneumaticRegistry.getInstance().registerFuel(FluidRegistry.getFluid("bioethanol"), 500000);
for(ItemStack stack : ((ItemPlasticElectronTube)plasticElectronTube).getSubItems()) {
RecipeManagers.fabricatorManager.addRecipe(null, FluidRegistry.getFluidStack("glass", 500), stack.copy(), new Object[]{" X ", "#X#", "XXX", '#', Items.redstone, 'X', new ItemStack(Itemss.plastic, 1, stack.getItemDamage())});
}
}
示例14: AddCarpenterRecipeOperation
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
public AddCarpenterRecipeOperation() {
super(RecipeManagers.carpenterManager, "Carpenter");
}
示例15: AddStillRecipeOperation
import forestry.api.recipes.RecipeManagers; //导入依赖的package包/类
public AddStillRecipeOperation() {
super(RecipeManagers.stillManager, "Still");
}