Resourceful Bees

Resourceful Bees

10M Downloads

Problems creating custom bee

trogarus opened this issue ยท 8 comments

commented

Having an issue with creating a new bee using JSON for the bee file and JavaScript for the script file with KubeJS.

Forge 36.1.2 (1-16-5)
Resourceful Bees - ResourcefulBees-1.16.5-0.6.5b.jar

Bee File
File Name "Mutant.json". Verifies through https://jsonlint.com/https://jsonlint.com/

{
  "flower": "ALL",
  "hasHoneycomb": false,
  "maxTimeInHive": 600,
  "ColorData": {
    "modelType": "GELATINOUS",
    "isBeeColored": true,
    "honeycombColor": "6E2C00",
    "primaryColor": "#6E2C00",
    "secondaryColor": "#5E4C41"
  },
  "MutationData": {
    "hasMutation": false
  },
  "CentrifugeData": {
    "hasCentrifugeOutput": false
  },
  "SpawnData": {
    "canSpawnInWorld": false,
    "biomeWhitelist": "tag:OVERWORLD"
  },
  "BreedData": {
    "isBreedable": true,
    "feedItem": "minecraft:poppy",
    "feedAmount": 1
  },
  "TraitData": {}
}

JS file for creating bee eggs
File name "bees.js" verifies through https://beautifytools.com/javascript-validator.php

// kubejs/server_scripts/example.js
// This is just an example script to show off multiple types of recipes and removal methods
// Supports /reload

// Listen to server recipe event
onEvent('recipes', event => {

// Add shaped recipe for 1 sand bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:sand_bee_spawn_egg', [
'CHC',
'CAC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
A: 'minecraft:sand'
});

// Add shaped recipe for 1 cobblestone bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:cobblestone_bee_spawn_egg', [
'CHC',
'CBC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
B: 'minecraft:cobblestone'
});

// Add shaped recipe for 1 coal bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:coal_bee_spawn_egg', [
'CHC',
'CDC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
D: 'minecraft:coal'
});

// Add shaped recipe for 1 gravel bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:gravel_bee_spawn_egg', [
'CHC',
'CEC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
E: 'minecraft:gravel'
});

// Add shaped recipe for 1 dust bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:dust_bee_spawn_egg', [
'CHC',
'CFC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
F: 'exnihilosequentia:dust'
});

// Add shaped recipe for 1 mutant bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:mutant_bee_spawn_egg', [
'CHC',
'CGC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
G: 'exnihilosequentia:sieve'
});

// Add shaped recipe for 1 rgbee bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:rgbee_bee_spawn_egg', [
'CHC',
'CIC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
I: 'minecraft:green_dye'
});

// Add shaped recipe for 1 icy bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:icy_bee_spawn_egg', [
'CHC',
'CJC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
J: 'minecraft:water_bucket'
});

// Add shaped recipe for 1 zombie bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:zombie_bee_spawn_egg', [
'CHC',
'CKC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
K: 'minecraft:rotten_flesh'
});

// Add shaped recipe for 1 snowball bee spawn egg
// (Shortcut for event.recipes.minecraft.crafting_shaped)
event.shaped('1x resourcefulbees:snowball_bee_spawn_egg', [
'CHC',
'CLC',
'CHC'
], {
H: 'minecraft:honey_block',
C: 'minecraft:honeycomb_block',
L: 'minecraft:snowball'
});
});

KubeJS error:

[13:18:47] [ERR ] startup_scripts:bees.js:70: Failed to create recipe for type 'minecraft:crafting_shaped': 1x resourcefulbees:mutant_bee_spawn_egg is not a valid result!

All other bee eggs work except for the Mutant I created and I can't figure out why. Recipes for other bees require Mutant, and information shows Mutant as a required breeding parent. But no matter what I do, and I've been working on trying to trouble shoot this for three days, I can't seem to get it to recognize the egg recipe and it doesn't show in JEI when all the others do. I am stumped. Any help would be greatly appreciated. The Mutant bee does not show in JEI as an icon either. Thanks in advance.

commented

That was it. Bee showing and recipe working. Now just have to regen the language file and that should fix that issue. Thanks.

commented

perfect! let us know if you have any other issues :)

commented

One final comment. Love the mod by the way. Nice change to generate resources. Kudos to the devs.

commented

All bee file JSON are in the same folder as well. Forgot to mention that.

commented

send latest.log

commented

you're missing a # in front of your color

commented

Figured, it was a punctuation issue. Thanks. Will fix that (many thanks for catching what I missed), and will report back. Your reply and help is GREATLY appreciated. Was pulling out my hair after three days of trying to figure it out.

commented

you should have crashed for not having the # however bc of a change that was made the exceptions weren't properly being caught. our latest version (alpha) on curse has that corrected so it will crash with more useful information