Code Monkey home page Code Monkey logo

kjsbotanypots's Introduction

Hi! I'm Bob Varioa!

About Me

  • Front-end JS developer, who dips their hands in the backend sometimes ;)
  • Interests: Language design, Linguistics, and L... Tetris
  • It's a pseudonym :P

Skills

  • Programming Languages
    • Javascript (Typescript)
    • HTML, (S)CSS
    • Java
    • Kotlin
    • C#
    • SQL(-ite)
  • Web technologies
    • (P)react
    • MUI Components
  • Other technologies
    • Gtk, Gdk, and GStreamer

Current Projects

Finished Projects

Contact

  • @bobvarioa on Discord

kjsbotanypots's People

Contributors

bobvarioa avatar

Watchers

 avatar

kjsbotanypots's Issues

Please support biological entities

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
)

})`

Error creating botany seed

Running ATM8 with extra mods - kubejs botany pots, botany pot ores and a few others.

I've created a kubejs file in the server_scripts section:

File Name - CruxSeeds:

ServerEvents.recipes(event => {
    event.recipes.botanypots.crop(
        "mysticalagriculture:allthemodium_seeds", // seed item
        ["kubejs:farmland/insanium"], // categories that this crop can be planted on
        1000, // growthTicks
        1, // growthModifier - this can be set to 1 in most cases
        { block: "mysticalagriculture:crops" }, // display block
        [
            {
                output: "mysticalagriculture:allthemodium_essence", // item
                chance: 100, // weight of this entry compared to the others
                minRolls: 1, // the minimum times this loot will be chosen
                maxRolls: 2, // the maximum times this loot will be chosen
                // for example, when chosen this will give 1 to 2 candles
            }
        ]
    )
})

// fired everytime a crop grows
BotanyPotsEvents.onCropGrow(event => {
  	// event.random : the random object associated with the event
  	// event.crop : a crop object describing the crop grown, use ProbeJS to find the specifics 
  	// event.originalDrops : an array of items this crop drops  
  	// event.drops : a writable array that changes the drops of the crop 
    console.log([event.random, event.crop, event.originalDrops, event.drops].join(","))
})

When running the game the recipe is not parsed due to the following error:
[23:28:08] [ERROR] ! server_scripts:mods/botanypots/CruxSeeds.js:2: Failed to create recipe for type 'botanypots:crop': Unable to cast 'display:com.bobvarioa.kubejsbotanypots.components.DisplayComponent@14d7703f[]' value '1000.0' to 'array'!

I'm not quite sure what I've done wrong as there isn't much documentation that I've found and i copied/pasted the template from the wiki - modified it to suit my needs.

Here is the complete kubejs server log.
server.log

SideNote:
Also just as a side note, it would be useful to know what blocks can be used as categories - is it an oredict?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.