Suggestion: More graceful and informative handling of unknown blocks.
TauPan opened this issue ยท 0 comments
First of all, thanks for this mod. It's delightful to use. I tried for some time to wrap my head around litematica and find building gadgets much easier to use. (I know the use-cases are different, but still this matters to me.)
I recently tried to paste a template (via operating system copy + paste) from an ATM9 world to Project Architect 2.
When trying to paste the JSON I just received the message "Invalid JSON" on screen.
I'm pretty sure it was not the JSON format itself that was invalid but that the copy + paste gadget was stumbling over blocks that were not in the modpack.
I have some ideas what might be helpful here:
- Give a list of problems in the json in the console, e.g. unknown blocks, syntax errors or whatever. Easiest would probably just the first problem that was encountered but most helpful would be a full list of problems.
- Give instructions how the template/JSON might be fixed, if possible? I don't know if that is possible.
- Maybe add a checkbox to the template manager or the copy-paste gadget to just ignore unknown blocks or whatever?
Here's the json I tried to paste (It's a dreadful dirt mob farm):
{
"name": "ATM D Mobfarm",
"statePosArrayList": "{blockstatemap:[{Name:\"minecraft:air\"},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"false\",connected_south:\"false\",connected_up:\"false\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"false\",connected_south:\"false\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"false\",connected_north:\"false\",connected_south:\"false\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"create:copper_scaffolding\",Properties:{bottom:\"true\",distance:\"7\",waterlogged:\"false\"}},{Name:\"absentbydesign:slab_glass\",Properties:{type:\"top\",waterlogged:\"false\"}},{Name:\"absentbydesign:slab_glass\",Properties:{type:\"bottom\",waterlogged:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"false\",connected_south:\"true\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"false\",connected_south:\"true\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"false\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"false\",connected_north:\"false\",connected_south:\"true\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"false\",connected_south:\"true\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"false\",connected_south:\"false\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"false\",connected_south:\"false\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"glassential:glass_ethereal\"},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"false\",connected_south:\"false\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"false\",connected_south:\"true\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"modularrouters:modular_router\",Properties:{active:\"false\",can_emit:\"false\",facing:\"east\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"false\",connected_south:\"false\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"false\",connected_south:\"true\",connected_up:\"false\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"false\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"false\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"true\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"true\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"true\",connected_south:\"false\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"true\",connected_south:\"true\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"true\",connected_south:\"true\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:saw\",Properties:{facing:\"west\",powered:\"true\"}},{Name:\"minecraft:lever\",Properties:{face:\"wall\",facing:\"east\",powered:\"true\"}},{Name:\"mekanism:basic_fluid_tank\",Properties:{active:\"false\",fluid_logged:\"empty\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"true\",connected_south:\"true\",connected_up:\"false\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"true\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"true\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"false\",connected_north:\"true\",connected_south:\"true\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:dreadful_dirt\"},{Name:\"modularrouters:modular_router\",Properties:{active:\"false\",can_emit:\"false\",facing:\"south\"}},{Name:\"minecraft:chest\",Properties:{facing:\"south\",type:\"single\",waterlogged:\"false\"}},{Name:\"mob_grinding_utils:absorption_hopper\"},{Name:\"mob_grinding_utils:ender_inhibitor_on\",Properties:{type:\"west\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"true\",connected_south:\"false\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"morered:red_alloy_wire\",Properties:{down:\"false\",east:\"false\",north:\"false\",south:\"false\",transform:\"identity\",up:\"false\",west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"false\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"true\",connected_up:\"false\",connected_west:\"false\"}},{Name:\"minecraft:lever\",Properties:{face:\"wall\",facing:\"west\",powered:\"true\"}},{Name:\"mob_grinding_utils:fan\",Properties:{facing:\"east\",powered:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"false\",connected_north:\"true\",connected_south:\"true\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"false\",connected_north:\"true\",connected_south:\"true\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"minecraft:redstone_lamp\",Properties:{lit:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"false\",connected_south:\"true\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"false\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"true\",connected_north:\"true\",connected_south:\"false\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"false\",connected_east:\"false\",connected_north:\"true\",connected_south:\"false\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"true\",connected_south:\"false\",connected_up:\"true\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:fan\",Properties:{facing:\"north\",powered:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"true\",connected_south:\"false\",connected_up:\"true\",connected_west:\"true\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"true\",connected_north:\"true\",connected_south:\"false\",connected_up:\"false\",connected_west:\"false\"}},{Name:\"mob_grinding_utils:tinted_glass\",Properties:{connected_down:\"true\",connected_east:\"false\",connected_north:\"true\",connected_south:\"false\",connected_up:\"false\",connected_west:\"true\"}},{Name:\"minecraft:lever\",Properties:{face:\"wall\",facing:\"south\",powered:\"true\"}},{Name:\"ars_nouveau:vitalic_sourcelink\"},{Name:\"ars_nouveau:relay\",Properties:{waterlogged:\"false\"}}],endpos:{X:10,Y:0,Z:0},startpos:{X:0,Y:-5,Z:-11},statelist:[I;0,0,0,0,0,0,1,2,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,8,8,8,8,9,8,10,5,0,11,12,12,12,12,13,14,15,16,0,0,11,12,12,12,12,13,14,15,16,17,0,11,12,12,12,12,12,18,12,16,0,0,19,20,20,20,20,20,20,20,21,0,0,0,7,8,8,8,8,8,8,10,0,0,22,23,24,24,24,24,24,23,25,6,0,26,0,0,0,0,0,0,27,26,28,0,26,0,0,0,0,0,0,0,26,29,0,26,0,0,0,0,0,0,0,26,0,0,30,31,31,31,31,31,31,31,32,0,0,0,22,31,31,31,31,31,33,34,0,0,22,32,35,35,35,35,35,30,25,36,0,26,0,0,0,0,0,0,0,26,37,0,26,0,0,0,0,0,0,0,26,38,0,26,0,0,0,0,0,0,0,26,39,0,30,31,31,31,31,31,31,31,32,0,0,0,22,31,31,31,31,31,33,34,0,0,22,32,35,35,35,35,35,30,25,6,0,40,0,0,0,0,0,0,0,26,28,0,26,0,0,0,0,0,0,0,26,41,0,26,0,0,0,0,0,0,0,26,41,0,30,31,31,31,42,31,31,31,32,41,0,0,22,31,31,31,31,31,33,34,0,0,43,32,35,35,35,35,35,30,25,6,44,45,0,0,0,0,0,0,0,26,0,0,46,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,30,31,31,47,48,43,31,31,32,0,0,0,22,31,31,31,31,31,33,34,0,6,22,32,35,35,35,35,35,30,25,6,0,49,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,30,31,31,31,9,31,31,31,32,0,0,0,22,31,31,31,31,31,33,34,0,6,22,32,35,35,35,35,35,30,25,6,0,26,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,30,31,31,31,31,31,31,31,32,0,0,0,50,51,51,51,51,51,51,52,0,6,22,23,20,20,20,20,20,23,25,6,0,26,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,26,0,0,0,0,0,0,0,26,0,0,30,31,31,31,31,31,31,31,32,0,0,0,0,0,0,0,0,0,0,0,0,6,50,51,51,51,42,42,51,51,52,6,0,53,12,12,13,54,0,15,12,55,0,0,53,12,12,12,18,18,12,12,55,0,0,53,12,12,12,12,12,12,12,55,0,0,56,24,24,24,24,24,24,24,57,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0]}",
"requiredItems": {
"morered:red_alloy_wire": 3,
"minecraft:redstone_lamp": 1,
"minecraft:lever": 4,
"mob_grinding_utils:ender_inhibitor_on": 1,
"minecraft:chest": 1,
"mob_grinding_utils:fan": 2,
"modularrouters:modular_router": 2,
"ars_nouveau:relay": 1,
"mekanism:basic_fluid_tank": 1,
"absentbydesign:slab_glass": 26,
"mob_grinding_utils:dreadful_dirt": 25,
"mob_grinding_utils:absorption_hopper": 1,
"mob_grinding_utils:tinted_glass": 287,
"glassential:glass_ethereal": 2,
"ars_nouveau:vitalic_sourcelink": 1,
"create:copper_scaffolding": 4,
"mob_grinding_utils:saw": 1
}
}
I tried to remove all the more_red
blocks and tried to replace the slab_glass
and glass_ethereal
blocks with the appropriate ones from the PA2 modpack but that just gave me the same error. I don't know if that would be a feasible approach anyways.
(Also is there any reason that (statePosArrayList
is a quoted json string instead of a nested json object?)statePosArrayList
obviously isn't valid json, sorry.)