Jump to content

Collission bigger than Block


Stefan Al

Recommended Posts

Heyo :)

I have created a blockshape which is 1 block high and 3 block wide. Unfortunately I can't get the collision box to be bigger than 1 block. No matter what value I enter, I can just walk through 2 of the 3 blocks.

If someone can tell me the solution, I would be very grateful!

 

 

Link to comment
Share on other sites

6 hours ago, Stefan Al said:

Thank you! Do you know if there is some kind of wiki page for creating multiblocks somewhere? I haven't found anything about it.

Multiblocks have seen a lot of changes of late and I don't think there's any documentation per se, other than their usage (json files, c# code).
The simplest multiblock implementation is a json only behavior - "Multiblock".  Look at the vanilla painting to see it in action.

..\Vintagestory\assets\survival\blocktypes\wood\painting.json

{ name: "Multiblock", propertiesByType: {
                    "*-north": { sizex: 2, sizey: 1, sizez: 1, cposition: { x: 0, y: 0, z: 0 } },
                    "*-east": { sizex: 1, sizey: 1, sizez: 2, cposition: { x: 0, y: 0, z: 0 } },
                    "*-south": { sizex: 2, sizey: 1, sizez: 1, cposition: { x: 1, y: 0, z: 0 } },
                    "*-west": { sizex: 1, sizey: 1, sizez: 2, cposition: { x: 0, y: 0, z: 1 } }
                }
            }

Beyond that, I typically use Visual Studio Code (https://code.visualstudio.com/download), open a folder like ..\Vintagestory\assets, then search for "multiblock" to see every file that has referenced such a thing. 

You could also head over to the Anego Studios github and search for the same thing to do a deeper dive on the c# front.
https://github.com/search?q=org%3Aanegostudios+multiblock&type=code

Edited by Spear and Fang
  • Thanks 1
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.