tweaked-programs / cccbridge

CC:C Bridge is a mc mod that adds compatibility between the ComputerCraft and Create mod!
https://cccbridge.tweaked-programs.cc/
Apache License 2.0
26 stars 13 forks source link

Modems broken by Create contraptions #82

Open MintTee opened 7 months ago

MintTee commented 7 months ago

Description Modems broken by Create contraptions. Modems break by being turned into the entity / block state from the Create mod contraptions.

This issue has been reported and experience by a lot of other players. See thoses posts :

https://github.com/Creators-of-Create/Create/issues/4959 https://github.com/cc-tweaked/CC-Tweaked/issues/948

To Reproduce 1) Make a contraption with modem glued to it. 2) Move or turn the contraption so that it becomes an entity. 3) Turn the contraption back into blocks.

Result : Modems broke

Expected behavior Modems not breaking off contraptions.

To resolve issue Ok, so I have a pretty clear idea on why this is happening. Create uses the block tag "create:brittle" to indicate to it's contraption that objects such as redstone links or Valve handle should be placed last when the contraption converts back into blocks. That way blocks with the "create:brittle" have something to attach to.

Since CC:T modems (ender or wireless) don't have that "create:brittle" tag but also need to be attached to a solid block, I believe the contraption tries to place them first, therefore making them insta break / pop.

Adding this tag to modems may fix the issue. Since CCC:Bridge adds compatibility between Create and CC:T, I thought it would be a good idea to report it here.

Hope you can help, MintTee

Software :

SammyForReal commented 7 months ago

Hey, thank you for this issue! This sounds like a great idea, I didn't know about that actually. I will look into this.

MintTee commented 7 months ago

Thanks for the acknowledgment.

There is also this "create:safe_nbt" block tag which I guess tells the contraption to keep the nbt data of the blocks in order to place them with the same state. Not 100% sure though.

MintTee commented 4 months ago

I found a workaround to this issue.

It's possible to use turtles on contraptions. Since they are considered a solid block, they dont need a support block (they can float mid air). Therefore, unlike modems, they wont break when turned into a contraption form or back into the block form. They will, however, shutdown and restart.

If you create a program called "startup" in the default directory and have the "shell.run("program_name")" inside it, it is possible to run any program automatically as soon as a computer / turtle restarts.

Maybe this temporary workaround can help a few people experimenting with Computer Craft on Create contraptions.

Plite7067 commented 3 months ago

Create:safe_nbt seems to tell create that the block can have its nbt saved in a schematic without duplicating items, so not related as far as I can tell. https://github.com/Plite7067/CreateCCModemFix I made this datapack which seems to solve the problem by adding the brittle tag as the original poster suggested. It should work for all versions necessary - I have tested that it applies the tag correctly on 1.18.2+