本文整理匯總了Java中forestry.api.farming.Farmables類的典型用法代碼示例。如果您正苦於以下問題:Java Farmables類的具體用法?Java Farmables怎麽用?Java Farmables使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Farmables類屬於forestry.api.farming包,在下文中一共展示了Farmables類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addFarms
import forestry.api.farming.Farmables; //導入依賴的package包/類
public static void addFarms(){
//FMLInterModComms.sendMessage("forestry", "add-farmable-crop", String.format("[email protected]%s.+2", BlockLoader.tomatoCrop));
Farmables.farmables.get("farmVegetables").add(new FarmCrop(new ItemStack(ItemLoader.tomatoSeeds), BlockLoader.tomatoCrop, 7));
Farmables.farmables.get("farmVegetables").add(new FarmCrop(new ItemStack(ItemLoader.uselettuceSeeds), BlockLoader.lettuceCrop, 7));
//Farmables.farmables.put("farmBush", new ArrayList<IFarmable>());
Farmables.farmables.put("farmBush" , new FarmClick(BlockLoader.strawberryBush, 7));
Farmables.farmables.put("farmBush", new FarmClick(BlockLoader.peanutbush, 7));
}
示例2: FarmLogicArboreal
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicArboreal(IFarmHousing housing) {
super(housing,
new ItemStack[] { new ItemStack(Block.dirt) },
new ItemStack[] { new ItemStack(ForestryBlock.soil.blockID, 1, 0), new ItemStack(ForestryBlock.soil.blockID, 1, -1) },
new ItemStack[] { new ItemStack(Block.sand) },
Farmables.farmables.get("farmArboreal").toArray(new IFarmable[0])
);
}
示例3: FarmLogicInfernal
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicInfernal(IFarmHousing housing) {
super(housing,
new ItemStack[] { new ItemStack(Block.slowSand) },
new ItemStack[] { new ItemStack(Block.slowSand) },
new ItemStack[0],
Farmables.farmables.get("farmInfernal").toArray(new IFarmable[0]));
}
示例4: getFarmLogic
import forestry.api.farming.Farmables; //導入依賴的package包/類
@Override
protected IFarmLogic getFarmLogic(IFarmHousing housing) throws Throwable{
ArrayList<IFarmable> origList = (ArrayList<IFarmable>)Farmables.farmables.get("farmVegetables");
ArrayList<IFarmable> backup = new ArrayList<IFarmable>(origList);
origList.clear();
origList.add(new FarmablePlastic(getBlock()));
IFarmLogic logic = getLogicClass("FarmLogicVegetable").getConstructor(IFarmHousing.class).newInstance(housing);
origList.clear();
origList.addAll(backup);
return logic;
}
示例5: FarmLogicVegetable
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicVegetable(IFarmHousing housing) {
super(housing, Farmables.farmables.get("farmVegetables").toArray(new IFarmable[0]));
}
示例6: FarmLogicGourd
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicGourd(IFarmHousing housing) {
super(housing);
seeds = Farmables.farmables.get("farmGourd").toArray(new IFarmable[0]);
}
示例7: FarmLogicPoale
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicPoale(IFarmHousing housing) {
super(housing);
germlings = Farmables.farmables.get("farmPoales").toArray(new IFarmable[0]);
}
示例8: FarmLogicShroom
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicShroom(IFarmHousing housing) {
super(housing, new ItemStack[] { new ItemStack(Block.mycelium) }, new ItemStack[] { new ItemStack(Block.mycelium) },
new ItemStack[] { new ItemStack(Block.dirt) }, Farmables.farmables.get("farmShroom").toArray(new IFarmable[0]));
yOffset = -1;
}
示例9: FarmLogicSucculent
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicSucculent(IFarmHousing housing) {
super(housing);
germlings = Farmables.farmables.get("farmSucculentes").toArray(new IFarmable[0]);
}
示例10: FarmLogicCereal
import forestry.api.farming.Farmables; //導入依賴的package包/類
public FarmLogicCereal(IFarmHousing housing) {
super(housing, Farmables.farmables.get("farmWheat").toArray(new IFarmable[0]));
}
示例11: TileFarm
import forestry.api.farming.Farmables; //導入依賴的package包/類
public TileFarm() {
this.structureLogic = Farmables.farmInterface.createFarmStructureLogic(this);
}
示例12: preInit
import forestry.api.farming.Farmables; //導入依賴的package包/類
@Override
public void preInit() {
super.preInit();
Farmables.farmInterface = new FarmHelper();
ForestryBlock.mushroom = new BlockMushroom(Config.getOrCreateBlockIdProperty("mushroom", Defaults.ID_BLOCK_MUSHROOM), 0);
Farmables.farmables.put("farmArboreal", new ArrayList<IFarmable>());
Farmables.farmables.get("farmArboreal").add(new FarmableVanillaSapling());
Farmables.farmables.get("farmArboreal").add(new FarmableGE());
Farmables.farmables.put("farmShroom", new ArrayList<IFarmable>());
Farmables.farmables.get("farmShroom").add(new FarmableVanillaShroom(Block.mushroomBrown.blockID, 0));
Farmables.farmables.get("farmShroom").add(new FarmableVanillaShroom(Block.mushroomRed.blockID, 0));
Farmables.farmables.put("farmWheat", new ArrayList<IFarmable>());
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(new ItemStack(Item.seeds), Block.crops.blockID, 7));
Farmables.farmables.put("farmGourd", new ArrayList<IFarmable>());
Farmables.farmables.get("farmGourd").add(new FarmableGourd(new ItemStack(Item.pumpkinSeeds), new ItemStack(Block.pumpkinStem), new ItemStack(Block.pumpkin)));
Farmables.farmables.get("farmGourd").add(new FarmableGourd(new ItemStack(Item.melonSeeds), new ItemStack(Block.melonStem), new ItemStack(Block.melon)));
Farmables.farmables.put("farmInfernal", new ArrayList<IFarmable>());
Farmables.farmables.get("farmInfernal").add(new FarmableGenericCrop(new ItemStack(Item.netherStalkSeeds), Block.netherStalk.blockID, 3));
Farmables.farmables.put("farmPoales", new ArrayList<IFarmable>());
Farmables.farmables.get("farmPoales").add(new FarmableStacked(Block.reed.blockID, 3));
Farmables.farmables.put("farmSucculentes", new ArrayList<IFarmable>());
Farmables.farmables.get("farmSucculentes").add(new FarmableStacked(Block.cactus.blockID, 3));
Farmables.farmables.put("farmVegetables", new ArrayList<IFarmable>());
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(Item.potato), Block.potato.blockID, 7));
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(Item.carrot), Block.carrot.blockID, 7));
ForestryBlock.farm = new BlockFarm(Config.getOrCreateBlockIdProperty("farm", Defaults.ID_BLOCK_FARM)).setBlockName("ffarm");
Item.itemsList[ForestryBlock.farm.blockID] = null;
Item.itemsList[ForestryBlock.farm.blockID] = (new ItemFarmBlock(ForestryBlock.farm.blockID - 256, "ffarm"));
MinecraftForge.setBlockHarvestLevel(ForestryBlock.farm, "pickaxe", 0);
proxy.initializeRendering();
// Triggers
lowResourceLiquid50 = new TriggerLowLiquid(Defaults.ID_TRIGGER_LOWLIQUID_50, 0.5f);
lowResourceLiquid25 = new TriggerLowLiquid(Defaults.ID_TRIGGER_LOWLIQUID_25, 0.25f);
lowSoil128 = new TriggerLowSoil(Defaults.ID_TRIGGER_LOWSOIL_128, 128);
lowSoil64 = new TriggerLowSoil(Defaults.ID_TRIGGER_LOWSOIL_64, 64);
lowSoil32 = new TriggerLowSoil(Defaults.ID_TRIGGER_LOWSOIL_32, 32);
lowFertilizer50 = new TriggerLowFertilizer(Defaults.ID_TRIGGER_LOWFERTILIZER_50, 0.5f);
lowFertilizer25 = new TriggerLowFertilizer(Defaults.ID_TRIGGER_LOWFERTILIZER_25, 0.25f);
// Layouts
ICircuitLayout layoutManaged = new CircuitLayout("farms.managed");
ChipsetManager.circuitRegistry.registerLayout(layoutManaged);
ICircuitLayout layoutManual = new CircuitLayout("farms.manual");
ChipsetManager.circuitRegistry.registerLayout(layoutManual);
}