Block Definition

ordnael

New Member
Hello guys,

I wonder where you define the block size, because i wanted to change it. I'm looking for 3 days and nothing; __;.
I just can't find this array ;_;

Thanks.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
The block size ? As an array? Do you mean a chunk's size in terms of blocks?

If you mean the size a block has been it is dropped from a static world block then that I'm pretty sure is defined somewhere as that size has changed now and then.

Static blocks placed in the world are all the same size, although you can define an alternative block shape that effectively could make the block smaller :)

Also: Hello and welcome!
 

ordnael

New Member
The block size ? As an array? Do you mean a chunk's size in terms of blocks?

If you mean the size a block has been it is dropped from a static world block then that I'm pretty sure is defined somewhere as that size has changed now and then.

Static blocks placed in the world are all the same size, although you can define an alternative block shape that effectively could make the block smaller :)

Also: Hello and welcome!
Yo dude,

i guess i found it.

then, i'm talking about static blocks.I found in data/shapes/cube.json the vertices that are used for Side.java, BlockMeshPart.java for make the blocks for the chunk. But if i change the vertices size on this file will implies only in render, collision detect and another stuff still with old values...i need to analyze more :confused:.

My goal is to test various sizes of blocks, for example, create a chunk with only 4 blocks of 8 units/pixel. The actual block's size in terasology is 0.5 units/pixels.

Thanks for reply ;)
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
If your interest is in having individual blocks with different sizes, then I would suggest looking at how we have done doors - they are actually composed of two blocks but act as a single unit, so you place and remove them together.

There are two underlying assumptions to our world implementation - that the world is a uniform grid of blocks, and that blocks are all 1x1x1 in size (centered on their origin). The uniform grid is the stronger assumption, as it is reflected in the data storage. The 1x1x1 size is convenient because it allows converting a position to a block index (as an integer vector) and finding the block there - obviously if the entire world is uniformly scaled this can still be done. An easier fix for uniform scaling is just to change the player's size though.
 
Top