TroZ / s2cb

Schematic To Command Block - A utility for Minecraft that will convert .schematic or .nbt structure files into commands that can be run in command blocks that will create the structure in game
Apache License 2.0
18 stars 7 forks source link

Bedrock compatibility #4

Open SaintNick1214 opened 2 years ago

SaintNick1214 commented 2 years ago

Would be neat if this were bedrock compatible.

MrDiamond64 commented 2 years ago

just convert all the block ids to bedrock block ids. took me like 5 minutes for a small build

SaintNick1214 commented 2 years ago

Wouldn't it be nice if it were an option in the app? 😁

TroZ commented 2 years ago

There are a few issues with Bedrock compatibility.

The most obvious one is that there are blocks with different names. That actually should be too hard to solve, just keep separate list of block names for Java and Bedrock.

However, there is another issue with Bedrock. While both Java and Bedrock allow using 'setblock' or 'fill' to place blocks, and both allow specifying of block properties (such as the direction that stair or other block face and other similar properties, Bedrock does now allow specifying of NBT data ( unless https://minecraft.fandom.com/wiki/Commands/setblock is wrong). This is a problem as I use the NBT data tags is a few ways, but the most important way allows me to pack multiple commands into one command block, but specifying that a falling sand block as multiple passengers ( like passengers of a boat ) each of which is a command block mine cart with its own command, that land on a powered activator rail (the last of which then deletes all the command block minecarts). The other use of NBT block data is for completely specifying blocks, like putting items in chests just as they were saved in the schematic. I don't know of any way of replicating this functionality in Bedrock (unless @MrDiamond64 knows something I don't). The alternate that I support in Java, Data Packs, requires access to the server files, and as far as I know, is also only supported by Java. Without NBT data, you would have to put a command in the command block for every setblock or fill command, which is generally a few thousand, and more as the bigger and more detailed the build is. Currently my utility can compress about 300 of such commands into one command block, so toing it one at a time would be 300 times more tedious.

There are a few other minor issues, such as different blocks being able to be waterlogged, but those would be relatively minor and the utility would be useful even if they weren't fixed.

So, while I could support Bedrock, the actual use would be so tedious typing in every command (or even copy-pasting it) that I doubt that anyone would actually use it.

MrDiamond64 commented 2 years ago

his is a problem as I use the NBT data tags is a few ways, but the most important way allows me to pack multiple commands into one command block, but specifying that a falling sand block as multiple passengers ( like passengers of a boat ) each of which is a command block mine cart with its own command, that land on a powered activator rail (the last of which then deletes all the command block minecarts).

Using the Horion hack client, you can get a beehive that spawns in command block minecarts with all the commands.

The alternate that I support in Java, Data Packs, requires access to the server files, and as far as I know, is also only supported by Java.

Bedrock edition does support .mcfunctions, you just need to bundle it in a behaviour pack.

dbnar2 commented 1 year ago

This would be nice, for simpler pixel art type of projects. Hope it can get implemented sometime in the future :)