Jump to content

Having trouble figuring out dropbytype


Recommended Posts

I've been trying to make a tea mod I managed to make 3 different tea plant blocks using the variantgroups properties and the actual item (tea leaves) using variantgroups.

However I can't wrap my head around on how to make for example teablock-gea-crop, drop the gea leaves item and teablock-tea-crop, drop the tea leaves item, etc

Problem is that the 3 different types of tea plant won't drop their respective type of tea leaves, they don't drop anything.

got it solved.

{
        code: "teablock",
        variantgroups: [
        { code:"teatype", states: ["tea", "gea", "bea"] },
        { code:"plantstage", states: ["crop", "growing",             "ripe"] },
    ],

    class: "BlockPlant",
    creativeinventory: { "general": ["*"], "plants": ["*"] },
    renderpass: "OpaqueNoCull",
    drawtype: "json",
    blockmaterial: "Plant",
        shapebytype: {
        "*-crop": {
            base: "block/myteablock",
        },
        "*-growing": {
            base: "block/myteablock",
        },
        "*-ripe": {
            base: "block/myteablock",
        },

    },

        texturesbytype: {
        "*-crop": {
            all: { 
                base: "block/emptytea/{teatype}",
            },
        },
        "*-growing": {
            all: { 
                base: "block/floweringtea/{teatype}",
        }, },
        "*-ripe": {
        all: { 
            base: "block/ripetea/{teatype}",
        }, }

    },


dropsByType: {
        "*-ripe": [
            { type: "block", code: "theteamod:teablock-{type}-crop", quantity: { avg: 1 }  },
            { type: "item", code: "theteamod:tea-{type}", quantity: { avg: 2.2 }  },
        ],
        "*": [
            { type: "block", code: "theteamod:teablock-{type}-crop", quantity: { avg: 1 }  }
        ]
    },


    attributes: {
        butterflyFeedByType: {
            "*-1": false,
            "*-3": false,
            "*": true
        },
        beeFeedByType: {
            "*-1": false,
            "*-3": false,
            "*": true
        },
        sitHeight: 0.55,
        tickGrowthProbability: 0.05,
        handbook: {
            include: true
        }
    },
    sideopaque: {
        all: false
    },
    sidesolid: {
        all: false
    },
    replaceable: 3000,
    lightAbsorption: 0,
    resistance: 0.5,
    sounds: {
        place: "game:block/plant",
        break: "game:block/plant",
        hit: "game:block/plant"
    },
    rainPermeable: false,
    
    collisionbox: null,
    selectionbox: { x1: 0.0625, y1: 0, z1: 0.0625, x2: 0.9375, y2: 0.25, z2: 0.9375 },
    materialDensity: 200,
    vertexFlags: {
        grassWindwave: true,
        weakWave: true
    },
    combustibleProps: {
        burnTemperature: 600,
        burnDuration: 10,
    }
}

 

 

 

Edited by ThatNoLifeArtist
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.