Closed dimaguy closed 6 months ago
3dj files are JSON? I'm not sure I understand the problem?
Javascript refuses to do objects without a key-value relation
seatPos is already an array. For reference, here is one of my test prints:
{
"label": "a",
"tooltip": "Made with Blockbench",
"isButton": false,
"collideWhenOn": true,
"collideWhenOff": true,
"lightLevel": 0,
"redstoneLevel": 0,
"seatPos": [0.5, 0.1, 0.5],
"shapesOff": [
{
"bounds": [0, 0, 0, 16, 1, 16],
"texture": "minecraft:block/stripped_birch_log",
"tint": "FFFFFF"
}
],
"shapesOn": [
{
"bounds": [0, 0, 0, 16, 1, 16],
"texture": "minecraft:block/stripped_birch_log",
"tint": "FF0000"
},
{
"bounds": [0, 1, 0, 16, 11, 1],
"texture": "minecraft:block/stripped_birch_log",
"tint": "FF0000"
},
{
"bounds": [0, 1, 15, 16, 11, 16],
"texture": "minecraft:block/stripped_birch_log",
"tint": "FF0000"
},
{
"bounds": [15, 1, 1, 16, 11, 15],
"texture": "minecraft:block/stripped_birch_log",
"tint": "FF0000"
},
{
"bounds": [0, 1, 1, 1, 11, 15],
"texture": "minecraft:block/stripped_birch_log",
"tint": "FF0000"
}
]
}
I think they are confused by how it's explained in documentation using lua table.
Oh, then there's a mistake in the docs, because you're using curly braces there
I think they are confused by how it's explained in documentation using lua table.
Got it, fixing now
Maybe I'm being stupid, or there's something I'm missing. but as I'm writing a Pull Request for Sam's 3DJ blockbench plugin (written in javascript) I can't seem to be able to output a lua table with just numbers without falling onto very stupid string manipulation workarounds. Could the coordinates be inserted with an array of numbers instead?
TL;DR: [ ] instead of { } pretty please?