KubeJS (Old)

KubeJS (Old)

3M Downloads

Missing functions in Direction object

lonevox opened this issue ยท 3 comments

commented

Minecraft Version

1.21.1

KubeJS Version

2101.7.2-build.286

Rhino Version

2101.2.7-build.81

Architectury Version

N/A

Forge/Fabric Version

NeoForge 21.1.212

Describe your issue

get3DDataValue and get2DDataValue are public functions in the Direction class, however they don't exist on Direction objects in kubejs. The following errors:

BlockEvents.rightClicked((event) => {
	console.log(Direction.DOWN.get2DDataValue());
}

Crash report/logs

The error:
[12:43:59] [Server thread/ERROR] [KubeJS Server/]: item_deposit.js#23: Error in 'BlockEvents.rightClicked': dev.latvian.mods.rhino.EcmaError: TypeError: Cannot find function get2DDataValue in object down.

commented

KubeJS renamed those, check here:

Image
commented

I think the best way for that question is using ProbeJS: Using ProbeJS

commented

Is there documentation on renamed methods? Just looking through the repo I guess? I'm basing my code off of the Minecraft source code, so this is kinda annoying.