BobVarioa / kjsbotanypots

KubeJS Botany Pots
Other
0 stars 0 forks source link

Please support biological entities #3

Open SkyIce0229 opened 8 months ago

SkyIce0229 commented 8 months ago

I want to add the egg growing recipe, but it seems that the use of bio-entities in {block: 'minecraft:grass_block'} is not supported。 Here's the recipe I added: `ServerEvents.recipes(event => {

event.recipes.botanypots.crop(
    'minecraft:egg', // seed item
    ['minecraft:egg'], // categories that this crop can be planted on
    { block: 'minecraft:grass_block' }, // display block
    [
        Item.of ('minecraft:egg') // item
            .withChance(1) // weight of this entry compared to the others 1:100
            .withRolls(2, 3) // the times this loot will be chosen (min, max)
        // for example, when chosen this will give 1 to 2 candles
    ],
    1200, // growthTicks 100 = 0:05
    1, // optional, growthModifier - this can be set to 1 in most cases
)

event.recipes.botanypots.soil(
    'minecraft:chicken', // the item that this soil is attached to
    { block: 'minecraft:grass_block' }, // display block
    ['minecraft:chicken'], // categories that this soil provides
    100, // growth ticks that this soil will provide, set to -1 for no modifier
    1 // optional, growth modifier, example: 0.5 means all crops will take half the time
)

event.recipes.botanypots.fertilizer(
    'minecraft:wheat_seeds', // fertilizer item
    10, // min growth ticks applied
    20 // max growth ticks applied
    // ex: 10 to 20 ticks will be randomly given to the crop
)

})`

BobVarioa commented 8 months ago

I'm not quite sure what you're trying to do here? The example you gave seems to work for me?