SlopeCraft / SlopeCraft

Map Pixel Art Generator for Minecraft
https://slopecraft.rtfd.io
GNU General Public License v3.0
530 stars 31 forks source link

[Bug]: worldedit加载schem失败 #124

Open zyklone4096 opened 1 month ago

zyklone4096 commented 1 month ago

请选择:

问题描述

worldedit加载导出的schem文件失败,且Litematica也无法加载

01.zip

重现

  1. 导入图片尺寸256*256,地图画配置游戏版本1.21立体地图画,方块全选
  2. 转换模式Lab00 抖动开
  3. 导出WE原理图,offset 0 0 0,WEOffset 0 0 0,原理图名称1,有损压缩256,连接蘑菇块
  4. 放入config/worldedit/schematics/01.schem
  5. 游戏内//schem load 01
  6. 出现报错

相关日志输出(如果有)

内置服务器WorldEdit: [WorldEdit Task Executor - 0/ERROR]: Uncaught exception occurred in task: Loading schematic 01
java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.world.block.BlockState.toBaseBlock(org.enginehub.linbus.tree.LinCompoundTag)" because "state" is null
    at com.sk89q.worldedit.extent.clipboard.io.sponge.ReaderUtil.initializeClipboardFromBlocks(ReaderUtil.java:177) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.decodeBlocksIntoClipboard(SpongeSchematicV3Reader.java:148) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.readVersion3(SpongeSchematicV3Reader.java:121) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.read(SpongeSchematicV3Reader.java:71) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:356) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:338) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.command.util.AsyncCommandBuilder.runTask(AsyncCommandBuilder.java:158) ~[%5B创世神%5D%20worldedit-mod-7.3.6.jar:?]
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) ~[guava-32.1.2-jre.jar:?]
    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75) ~[guava-32.1.2-jre.jar:?]
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) ~[guava-32.1.2-jre.jar:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

独立服务端WorldEdit: Uncaught exception occurred in task: Loading schematic 01
java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.world.block.BlockState.toBaseBlock(org.enginehub.linbus.tree.LinCompoundTag)" because "state" is null
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.extent.clipboard.io.sponge.ReaderUtil.initializeClipboardFromBlocks(ReaderUtil.java:177) ~[worldedit-bukkit-7.3.6.jar:?]
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.decodeBlocksIntoClipboard(SpongeSchematicV3Reader.java:148) ~[worldedit-bukkit-7.3.6.jar:?]
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.readVersion3(SpongeSchematicV3Reader.java:121) ~[worldedit-bukkit-7.3.6.jar:?]
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.read(SpongeSchematicV3Reader.java:71) ~[worldedit-bukkit-7.3.6.jar:?]
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:356) ~[worldedit-bukkit-7.3.6.jar:?]
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:338) ~[worldedit-bukkit-7.3.6.jar:?]
        at worldedit-bukkit-7.3.6.jar/com.sk89q.worldedit.command.util.AsyncCommandBuilder.runTask(AsyncCommandBuilder.java:158) ~[worldedit-bukkit-7.3.6.jar:?]
        at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) ~[guava-32.1.2-jre.jar:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Litematica: Invalid ID in the Sponge schematic palette: '253'

环境

内置服务器测试:Minecraft 1.21.1, Fabric 0.16.5, Fabric API 0.105.0+1.21.1, WorldEdit 7.3.6+6892, Litematcia 0.19.50

独立服务端测试:Minecraft 1.21.1, Paper 1.21.1-118-master@fb76840, WorldEdit 7.3.6+6892(无其他插件)

请确认以下条款

Mifan-T commented 1 month ago

已在worldedit上复现

image

日志:

[04:54:53] [Render thread/INFO]: [System] [CHAT] test1 loaded. Paste it with //paste
[04:55:00] [WorldEdit Task Executor - 2/WARN]: Schematic was made in a newer Minecraft version (3955 > 3953). Data may be incompatible.
[04:55:00] [WorldEdit Task Executor - 2/ERROR]: Uncaught exception occurred in task: Loading schematic 128
java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.world.block.BlockState.toBaseBlock(org.enginehub.linbus.tree.LinCompoundTag)" because "state" is null
    at com.sk89q.worldedit.extent.clipboard.io.sponge.ReaderUtil.initializeClipboardFromBlocks(ReaderUtil.java:177) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.decodeBlocksIntoClipboard(SpongeSchematicV3Reader.java:148) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.readVersion3(SpongeSchematicV3Reader.java:121) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.extent.clipboard.io.sponge.SpongeSchematicV3Reader.read(SpongeSchematicV3Reader.java:71) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:356) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:338) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.sk89q.worldedit.command.util.AsyncCommandBuilder.runTask(AsyncCommandBuilder.java:158) ~[%5BW%5D%5BWE%5Dworldedit-mod-7.3.6.jar:?]
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) ~[guava-32.1.2-jre.jar:?]
    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75) ~[guava-32.1.2-jre.jar:?]
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) ~[guava-32.1.2-jre.jar:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[04:55:00] [Render thread/INFO]: [System] [CHAT] Failed to load schematic: Unknown error. Please see console.

复现所使用的版本信息:

Minecraft 1.21 worldedit-mod-7.3.6

可能是1.21的WE原理图又改了,还没来得及做适配。可以考虑暂时换用投影Mod


在投影Mod(Litematica)中未能复现

image

版本信息: Minecraft 1.21.1 malilib-fabric-1.21.1-0.21.0 litematica-fabric-1.21.1-0.19.50

请检查你是否使用了正确的投影文件,WE的原理图是无法加载到投影Mod中的(不建议在投影中加载WE原理图)

要使用投影,请在导出时选择Litematica格式 image

ToKiNoBug commented 1 month ago

OMG,WE原理图的格式又改了?我看看它改成什么样子了

Mifan-T commented 1 month ago

OMG,WE原理图的格式又改了?我看看它改成什么样子了

我又试了下1.20,结果发现也没法加载

image

估计就是在#111 中提到的问题没完全解决