multiconnect

multiconnect

108k Downloads

Invalid commands using 1.17-only-blockstates + Litematica

Andrews54757 opened this issue ยท 1 comments

commented

EG:

/setblock ~ ~ ~ minecraft:rail[waterlogged=true]

autocompletes in a 1.16 world though waterloggable rails were only introduced in 1.17. This will fail to run on the server.

Multiconnect does not translate block state arguments, but it would be really nice if it did. For example, using litematica paste on a 1.16 server with a 1.17 client will fail to setblock rails.

https://github.com/maruohon/litematica/blob/bcb43ab1f1e6856f3cb266a54bf91a03d19d5541/src/main/java/fi/dy/masa/litematica/scheduler/tasks/TaskPasteSchematicSetblock.java#L321-L329

Litematica uses the BlockArgumentParser.stringifyBlockState method to stringify block states, which leads to incompatible commands. It would be really nice if multiconnect could translate the block states across versions so that litematica would be able to paste properly.

commented

After the rewrite, this situation should be improved a little. Litematica may still try to place blocks that don't exist on the server but at least it should always consistently try to use the new version of the block name now. The best solution might be a compatibility layer between litematica and multiconnect to make sure it sends the right commands. This may be helped by an improved API on multiconnect's side.