How do I add the seed as a real item instead of a virtual one so that it can be handled in LootJS? I need this to adjust the drop rate
My code:
StartupEvents.registry('block', event => {
event.create('my_crop', 'crop')
.displayName('My Crop')
.crop('kubejs:my_crop_seed')
.age(3, builder => {
builder
.shape(0, 0, 0, 0, 16, 2, 16)
.shape(1, 0, 0, 0, 16, 4, 16)
.shape(2, 0, 0, 0, 16, 6, 16)
.shape(3, 0, 0, 0, 16, 8, 16)
})
.item(seedItem => {
seedItem.texture('kubejs:item/my_crop_seed').displayName('§6My crop Seed')
})
})
if I try to add a seed as a drop using LootJS like here, I get this error
LootJS.modifiers(event => {
event.addBlockModifier('kubejs:my_crop')
.randomChance(1)
.addLoot("kubejs:grown_plant")
event.addBlockModifier('kubejs:my_crop')
.randomChance(0.1)
.addLoot("kubejs:my_crop_seed")
})
[02:08:25] [ERROR] ! server_scripts:crop.js#9: [LootEntry.of()] Invalid item stack, returning empty stack: kubejs:my_crop_seed
[02:08:25] [ERROR] ! server_scripts:crop.js#9: - Consider using `LootEntry.empty()` if you want to create an empty loot entry.
I would also like to check that the age of the plant already has a certain value and only then drop the desired item, I did not find a competent solution on this matter