I can't seem to get feasts or pies to work
linkovich2 opened this issue ยท 5 comments
I've got this installed on 1.19.2, forge 43.2.14, but the feast and pie type don't seem to be registering. Here's my script:
// priority: 0
StartupEvents.registry('item', event => {
// regular effects
event.create('birds_nest_soup').food(food => { food.hunger(7).saturation(2).effect('farmersdelight:comfort', 6000, 0, 1) })
event.create('charcoal_waffles').food(food => {
food.hunger(4).saturation(0.8).effect('minecraft:fire_resistance', 300, 0, 1).effect('minecraft:slowness', 240, 0.7, 1)
})
event.create('turkey_pot_pie_slice').food(food => {
food.hunger(4).saturation(0.4).effect('farmersdelight:comfort', 600, 0, 1).effect('farmersdelight:nourishment', 300, 0, 1)
})
event.create('steamed_beef_wrap').food(food => {
food.hunger(8).saturation(0.8).effect('farmersdelight:nourishment', 2400, 0, 1).effect('neapolitan:agility', 600, 0, 1)
})
// @todo should return a glass bottle on use
event.create('purple_cow_float').food(food => {
food.hunger(0).saturation(0).effect('minecraft:levitation', 120, 0, 1).alwaysEdible()
}).useAnimation('drink')
event.create('thrasher_soup').food(food => {
food.hunger(7).saturation(0.8).effect('minecraft:strength', 300, 2, 1).effect('minecraft:blindness', 260, 0, 1)
})
// unique effects
event.create('dirt_cup').food(food => { food.hunger(4).saturation(0.6) }).useAnimation('drink') // gives night vision in rain or water according to y level
event.create('traffic_jam_roll').food(food => { food.hunger(5).saturation(0.8) }) // gives movespeed and slows surrounding entities temporarily
event.create('pool_party_stick').food(food => { food.hunger(9).saturation(0.6) }) // completely restores bubble meter
event.create('hunters_casserole').food(food => { food.hunger(8).saturation(0.6) }) // 15 seconds invis, reveal nearby enemies
event.create('turtle_gallimaufry').food(food => {
food.hunger(11).saturation(0.7).effect('farmersdelight:nourishment', 6000, 0, 1).effect('minecraft:water_breathing', 1800, 0, 1)
})
})
StartupEvents.registry('block', event => {
// event.create('turtle_gallimaufry_block', 'farmersdelight:feast')
// .material('bone')
// .servingsAmount(4)
// .hasLeftovers(true)
// .servingItems(['kubejs:turtle_gallimaufry', 'minecraft:turtle_shell'])
// .displayName('Turtle Gallimaufry')
event.create('turkey_pot_pie', 'farmersdelight:pie')
.material('cake')
.hardness(0.25)
.sliceItem('kubejs:turkey_pot_pie_slice')
})
Any my log says:
[20:07:23] [INFO ] Loaded script startup_scripts:irregular.js in 0.06 s
[20:07:23] [INFO ] startup_scripts:script.js:3: Loaded Java class 'dev.latvian.mods.kubejs.block.MaterialJS'
[20:07:23] [INFO ] startup_scripts:script.js:4: Loaded Java class 'net.minecraft.world.level.material.Material'
[20:07:23] [INFO ] startup_scripts:script.js:5: Loaded Java class 'net.minecraft.world.level.block.SoundType'
[20:07:23] [INFO ] startup_scripts:script.js:6: Loaded Java class 'net.minecraft.sounds.SoundEvent'
[20:07:23] [INFO ] startup_scripts:script.js:7: Loaded Java class 'net.minecraft.world.level.block.DoublePlantBlock'
[20:07:23] [INFO ] startup_scripts:script.js:8: Loaded Java class 'net.minecraft.world.level.block.state.BlockBehaviour$Properties'
[20:07:23] [INFO ] startup_scripts:script.js:9: Loaded Java class 'net.minecraft.world.item.BlockItem'
[20:07:23] [INFO ] startup_scripts:script.js:10: Loaded Java class 'net.minecraft.world.item.Item$Properties'
[20:07:23] [INFO ] startup_scripts:script.js:11: Loaded Java class 'net.minecraft.world.level.block.Blocks'
[20:07:23] [INFO ] startup_scripts:script.js:12: Loaded Java class 'net.minecraft.world.item.CreativeModeTab'
[20:07:23] [INFO ] Loaded script startup_scripts:script.js in 0.038 s
[20:07:23] [INFO ] Loaded 2/2 KubeJS startup scripts in 0.485 s
! [20:07:24] [ERR] #50: Error occurred while handling event 'StartupEvents.registry': java.lang.IllegalArgumentException: Unknown type 'farmersdelight:pie' for object 'turkey_pot_pie'!
[20:07:24] [ERR ] java.lang.IllegalArgumentException: Unknown type 'farmersdelight:pie' for object 'turkey_pot_pie'!
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.RegistryObjectBuilderTypes$RegistryEventJS.create(RegistryObjectBuilderTypes.java:55)
[20:07:24] [ERR ] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20:07:24] [ERR ] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[20:07:24] [ERR ] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[20:07:24] [ERR ] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.MemberBox.invoke(MemberBox.java:160)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.NativeJavaMethod.call(NativeJavaMethod.java:463)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.Interpreter.interpretLoop(Interpreter.java:1086)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.Interpreter.interpret(Interpreter.java:423)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.InterpretedFunction.call(InterpretedFunction.java:72)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.Context.doTopCall(Context.java:1197)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.ScriptRuntime.doTopCall(ScriptRuntime.java:2619)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.InterpretedFunction.call(InterpretedFunction.java:70)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.ArrowFunction.call(ArrowFunction.java:42)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:129)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.InterfaceAdapter.invoke(InterfaceAdapter.java:88)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.rhino.VMBridge.lambda$newInterfaceProxy$0(VMBridge.java:70)
[20:07:24] [ERR ] at TRANSFORMER/jdk.proxy3/jdk.proxy3.$Proxy90.onEvent(Unknown Source)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.event.EventHandlerContainer.handle(EventHandlerContainer.java:33)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.event.EventHandler.postToHandlers(EventHandler.java:206)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.event.EventHandler.post(EventHandler.java:183)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.event.EventHandler.post(EventHandler.java:158)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.RegistryObjectBuilderTypes.postEvent(RegistryObjectBuilderTypes.java:215)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.RegistryObjectBuilderTypes.registerFor(RegistryObjectBuilderTypes.java:221)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.KubeJSRegistries.init(KubeJSRegistries.java:95)
[20:07:24] [ERR ] at TRANSFORMER/[email protected]/dev.latvian.mods.kubejs.forge.KubeJSForge.initRegistries(KubeJSForge.java:44)
[20:07:24] [ERR ] at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260)
[20:07:24] [ERR ] at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252)
[20:07:24] [ERR ] at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
[20:07:24] [ERR ] at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:107)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$postEventWithWrapInModOrder$35(ModLoader.java:315)
[20:07:25] [ERR ] at java.base/java.lang.Iterable.forEach(Iterable.java:75)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:225)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.postEventWithWrapInModOrder(ModLoader.java:313)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:341)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:207)
[20:07:25] [ERR ] at java.base/java.util.Optional.ifPresent(Optional.java:178)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:207)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:185)
[20:07:25] [ERR ] at java.base/java.lang.Iterable.forEach(Iterable.java:75)
[20:07:25] [ERR ] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:185)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.<init>(Minecraft.java:468)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.m_239872_(Main.java:176)
[20:07:25] [ERR ] at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:51)
[20:07:25] [ERR ] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20:07:25] [ERR ] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[20:07:25] [ERR ] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[20:07:25] [ERR ] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
[20:07:25] [ERR ] at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
[20:07:25] [ERR ] at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
[20:07:29] [INFO ] startup_scripts:script.js:164: Removed potion brewing recipe: minecraft:awkward + {"item":"cave_enhancements:rose_quartz"} -> cave_enhancements:reversal
[20:07:29] [INFO ] startup_scripts:script.js:165: Removed potion brewing recipe: minecraft:awkward + {"item":"habitat:kabloom_pulp"} -> habitat:blast_endurance
[20:07:29] [INFO ] startup_scripts:script.js:166: Removed potion brewing recipe: minecraft:awkward + {"item":"habitat:dried_ball_cactus"} -> habitat:prickling
I'm a bit new to kubejs so it may be something obvious, but any help would be appreciated
You probably have KubeJS Delight 1.0.0, you should use 1.0.1
Wiki applies to the newest version. Also, thanks for reminding me that I should delete the outdated examples :P
I have 1.01 according to curseforge, and the jar itself is showing 1.01 and has the feast blockbuilder class in it it seems like.
Actually, I'm wondering if I actually released an update that applied those new builder ids lol