Ponder for KubeJS

Ponder for KubeJS

21M Downloads

Error creating ponder scene

LTCatt opened this issue ยท 3 comments

commented

Minecraft Version

1.20.1

Mod Version

2.0.1
Create: 6.0.4

Description

When startup, shows this in kubejs/client.log :

[22:34:57] [ERROR] ! ponder/test.js#9: Error in 'Ponder.registry': TypeError: Cannot find function create in object com.almostreliable.ponderjs.PonderItemTagEventJS@443da981.

/ponder reload will throw this:

[22:32:30] [ERROR] ! ponder/test.js#9: Error in 'Ponder.registry': TypeError: Cannot find function create in object com.almostreliable.ponderjs.PonderItemTagEventJS@5fc88b33.
[22:32:30] [ERROR] ! java.lang.NullPointerException: Cannot read field "f_46443_" because the return value of "net.minecraft.world.entity.Entity.m_9236_()" is null [java.lang.NullPointerException]
test.js

// priority: -1

Ponder.tags(event => {
    event.createTag("kubejs:ponder", "minecraft:apple", "Ponder Test", "Description.", ['minecraft:budding_amethyst'])
})

Ponder.registry(event => {
    event.create(["minecraft:budding_amethyst"])
         .scene("test", "Test Scene", "kubejs:test", (scene, util) => {
        scene.configureBasePlate(1, 0, 5);
        
        var baseScene = scene.world.showIndependentSection([5, 0, 0, 5, 4, 4], Facing.up)
        scene.world.showSectionAndMerge([4, 0, 0, 4, 1, 4], Facing.up, baseScene)
        scene.idle(25)

        scene.overlay.chaseBoundingBoxOutline(PonderPalette.FAST, [2, 1, 1], AABB.ofBlock([2, 1, 1]), 70)
        scene.idle(5)
        scene.overlay.showText(65).text("Text Line").pointAt([2.5, 1.5, 1.5]).placeNearTarget().attachKeyFrame().colored(PonderPalette.FAST);
        scene.idle(80)
    });
});

Log

latest.log

From the stacktrace, it's likely related to this ArmorStand:

https://github.com/Creators-of-Create/Ponder/blob/1af067c78617aa63915ba39b5e12375cf3b0c8f7/Common/src/main/java/net/createmod/ponder/foundation/PonderScene.java#L146

Did the issue happen in singleplayer or on a server?

Singleplayer

commented

I see where Error in 'Ponder.registry': TypeError: Cannot find function create in object com.almostreliable.ponderjs.PonderItemTagEventJS@443da981 comes from and easy to fix.

But I can't reproduce the NullPointerException with only PonderJS + dependencies. So there must be another mod causing trouble together with ponder. Can you please reduce the mods to get a minimal environment so I can test it.

commented

I tested it, and reproducing the NullPointerException also requires installing https://www.curseforge.com/minecraft/mc-mods/framework

CurseForge
A library providing powerful utilities for developers 47.4M Downloads | Mods
commented

Fixed with 2.0.2