Stone Walls (#825)

* Add wall model, add stone walls with wip textures

* Some work on textures...

* More work on texture. Tweak Voidstone bricsk

* Add voidstone and ferrock tiles, tweak their textures, more work on twall textures

* Add voidstone and ferrock walls., more work on textures

* Add remaining textures and add missing recipies

* undo change

* Remove mtl references

* Optimized (but z-fighting) wall model

* Fix a thing *backflip*

* Update fence and wall model for new code

* Improve how the fence rotation handles UVs on the top and bottom faces.

---------

Co-authored-by: IntegratedQuantum <jahe788@gmail.com>
This commit is contained in:
careeoki 2024-12-19 09:52:56 -07:00 committed by GitHub
parent 07888c7600
commit afcef76cdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
43 changed files with 412 additions and 62 deletions

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 25,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:basalt_wall",
.texture_top = "cubyz:basalt_wall_top",
.texture_bottom = "cubyz:basalt_wall_top",
.item = .{
.texture = "wall/basalt.png",
},
}

View File

@ -0,0 +1,11 @@
.{
.class = .stone,
.hardness = 25,
.breakingPower = 1,
.drops = .{
.auto,
},
.rotation = .stairs,
.model = "cubyz:cube",
.texture = "cubyz:ferrock_tiles",
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 12,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:ferrock_wall",
.texture_top = "cubyz:ferrock_wall_top",
.texture_bottom = "cubyz:ferrock_wall_top",
.item = .{
.texture = "wall/ferrock.png",
},
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 20,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:glacite_wall",
.texture_top = "cubyz:glacite_wall_top",
.texture_bottom = "cubyz:stone_wall_top",
.item = .{
.texture = "wall/glacite.png",
},
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 12,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:limestone_wall",
.texture_top = "cubyz:limestone_wall_top",
.texture_bottom = "cubyz:limestone_wall_top",
.item = .{
.texture = "wall/limestone.png",
},
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 12,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:marble_wall",
.texture_top = "cubyz:marble_wall_top",
.texture_bottom = "cubyz:marble_wall_top",
.item = .{
.texture = "wall/marble.png",
},
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 12,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:sandstone_wall",
.texture_top = "cubyz:sandstone_wall_top",
.texture_bottom = "cubyz:sandstone_wall_top",
.item = .{
.texture = "wall/sandstone.png",
},
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 12,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:stone_wall",
.texture_top = "cubyz:stone_wall_top",
.texture_bottom = "cubyz:stone_wall_top",
.item = .{
.texture = "wall/stone.png",
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

View File

@ -0,0 +1,11 @@
.{
.class = .stone,
.hardness = 25,
.breakingPower = 1,
.drops = .{
.auto,
},
.rotation = .stairs,
.model = "cubyz:cube",
.texture = "cubyz:void_stone_tile",
}

View File

@ -0,0 +1,15 @@
.{
.class = .stone,
.hardness = 60,
.drops = .{
.auto,
},
.rotation = .fence,
.model = "cubyz:wall",
.texture = "cubyz:void_stone_wall",
.texture_top = "cubyz:void_stone_wall_top",
.texture_bottom = "cubyz:void_stone_wall_top",
.item = .{
.texture = "wall/void_stone.png",
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

View File

@ -1,122 +1,173 @@
v 0.375 0.625 0
o unknown
v 0.375 0.625 1
v 0.375 0.625 0
v 0.375 0.375 0
v 0.375 0.375 1
v 0.625 0.375 0
v 0.625 0.375 1
v 0.625 0.375 0
v 0.625 0.625 0
v 0.625 0.625 1
v 0 0.4375 0.1875
v 0 0.4375 0.375
v 0 0.4375 0.1875
v 1 0.4375 0.1875
v 1 0.4375 0.375
v 1 0.5625 0.1875
v 1 0.5625 0.375
v 1 0.5625 0.1875
v 0 0.5625 0.1875
v 0 0.5625 0.375
v 0 0.4375 0.625
v 0 0.4375 0.8125
v 1 0.4375 0.625
v 1 0.4375 0.8125
v 1 0.5625 0.625
v 1 0.5625 0.8125
v 0 0.5625 0.625
v 0 0.5625 0.8125
v 0.4375 1 0.1875
v 0 0.4375 0.875
v 0 0.4375 0.6875
v 1 0.4375 0.6875
v 1 0.4375 0.875
v 1 0.5625 0.875
v 1 0.5625 0.6875
v 0 0.5625 0.6875
v 0 0.5625 0.875
v 0.4375 1 0.375
v 0.4375 1 0.1875
v 0.4375 0 0.1875
v 0.4375 0 0.375
v 0.5625 0 0.1875
v 0.5625 0 0.375
v 0.5625 0 0.1875
v 0.5625 1 0.1875
v 0.5625 1 0.375
v 0.4375 1 0.625
v 0.4375 1 0.8125
v 0.4375 0 0.625
v 0.4375 0 0.8125
v 0.5625 0 0.625
v 0.5625 0 0.8125
v 0.5625 1 0.625
v 0.5625 1 0.8125
vt 0.84375 0
v 0.4375 1 0.875
v 0.4375 1 0.6875
v 0.4375 0 0.6875
v 0.4375 0 0.875
v 0.5625 0 0.875
v 0.5625 0 0.6875
v 0.5625 1 0.6875
v 0.5625 1 0.875
vt 0.84375 0.25
vt 0.84375 0
vt 0.90625 0
vt 0.90625 0.25
vt 0.59375 0
vt 0.59375 0.25
vt 0.59375 0
vt 0.65625 0
vt 0.65625 0.25
vt 0.34375 0.25
vt 0.34375 0.5
vt 0.34375 0.25
vt 0.40625 0.25
vt 0.40625 0.5
vt 0.09375 0.25
vt 0.09375 0.5
vt 0.09375 0.25
vt 0.15625 0.25
vt 0.15625 0.5
vt 0.25 0.296875
vt 0.25 0.34375
vt 0.25 0.296875
vt 0.5 0.296875
vt 0.5 0.34375
vt 0 0.296875
vt 0 0.34375
vt 0.25 0.109375
vt 0 0.296875
vt 0.25 0.296875
vt 0.25 0.34375
vt 0.25 0.140625
vt 0.25 0.109375
vt 0.5 0.109375
vt 0.5 0.140625
vt 0 0.109375
vt 0 0.140625
vt 0.25 0.40625
vt 0 0.109375
vt 0.25 0.109375
vt 0.25 0.140625
vt 0.25 0.453125
vt 0.25 0.40625
vt 0.5 0.40625
vt 0.5 0.453125
vt 0 0.40625
vt 0 0.453125
vt 0.75 0.046875
vt 0 0.40625
vt 0.25 0.40625
vt 0.25 0.453125
vt 0.25 0.140625
vt 0.25 0.109375
vt 0.5 0.109375
vt 0.5 0.140625
vt 0 0.140625
vt 0 0.109375
vt 0.25 0.109375
vt 0.25 0.140625
vt 0.75 0.09375
vt 0.75 0.046875
vt 1 0.046875
vt 1 0.09375
vt 0.5 0.046875
vt 0.5 0.09375
vt 0.75 0.15625
vt 0.5 0.046875
vt 0.75 0.046875
vt 0.75 0.09375
vt 0.359375 0.25
vt 0.359375 0
vt 0.390625 0
vt 0.390625 0.25
vt 0.109375 0.25
vt 0.109375 0
vt 0.140625 0
vt 0.140625 0.25
vt 0.75 0.203125
vt 0.75 0.15625
vt 1 0.15625
vt 1 0.203125
vt 0.5 0.15625
vt 0.5 0.203125
vt 0.09375 0.09375
vt 0.5 0.15625
vt 0.75 0.15625
vt 0.75 0.203125
vt 0.359375 0.25
vt 0.359375 0
vt 0.390625 0
vt 0.390625 0.25
vt 0.109375 0.25
vt 0.109375 0
vt 0.140625 0
vt 0.140625 0.25
vt 0.09375 0.15625
vt 0.09375 0.09375
vt 0.15625 0.09375
vt 0.15625 0.15625
vt 0.34375 0.09375
vt 0.34375 0.15625
vt 0.34375 0.09375
vt 0.40625 0.09375
vt 0.40625 0.15625
vn -1 0 0
vn 1 0 0
vn 0 -1 0
vn 0 1 0
vn 0 -1 0
vn 0 1 0
vn 0 0 -1
vn 0 0 1
f 2/2/1 1/1/1 3/3/1 4/4/1
f 6/6/2 5/5/2 7/7/2 8/8/2
f 4/10/3 3/9/3 5/11/3 6/12/3
f 8/14/4 7/13/4 1/15/4 2/16/4
f 10/18/3 9/17/3 11/19/3 12/20/3
f 14/22/4 13/21/4 15/17/4 16/18/4
f 9/24/5 15/23/5 13/25/5 11/26/5
f 12/28/6 14/27/6 16/23/6 10/24/6
f 18/30/3 17/29/3 19/31/3 20/32/3
f 22/34/4 21/33/4 23/29/4 24/30/4
f 17/24/5 23/23/5 21/25/5 19/26/5
f 20/28/6 22/27/6 24/23/6 18/24/6
f 26/36/1 25/35/1 27/37/1 28/38/1
f 30/40/2 29/39/2 31/35/2 32/36/2
f 27/25/5 25/23/5 31/24/5 29/26/5
f 30/23/6 32/27/6 26/28/6 28/24/6
f 34/42/1 33/41/1 35/43/1 36/44/1
f 38/46/2 37/45/2 39/41/2 40/42/2
f 35/25/5 33/23/5 39/24/5 37/26/5
f 38/23/6 40/27/6 34/28/6 36/24/6
f 6/48/6 8/47/6 2/49/6 4/50/6
f 3/52/5 1/51/5 7/53/5 5/54/5
vn 0 -1 0
vn 0 1 0
vn 0 0 -1
vn 0 0 1
vn -1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 0 1
vn -1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 0 1
vn 0 0 1
vn 0 0 -1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/2 6/6/2 7/7/2 8/8/2
f 4/9/3 3/10/3 6/11/3 5/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 9/17/5 10/18/5 11/19/5 12/20/5
f 13/21/6 14/22/6 15/23/6 16/24/6
f 10/25/7 15/26/7 14/27/7 11/28/7
f 12/29/8 13/30/8 16/31/8 9/32/8
f 17/33/9 18/34/9 19/35/9 20/36/9
f 21/37/10 22/38/10 23/39/10 24/40/10
f 18/41/11 23/42/11 22/43/11 19/44/11
f 20/45/12 21/46/12 24/47/12 17/48/12
f 25/49/13 26/50/13 27/51/13 28/52/13
f 29/53/14 30/54/14 31/55/14 32/56/14
f 27/57/15 26/58/15 31/59/15 30/60/15
f 29/61/16 32/62/16 25/63/16 28/64/16
f 33/65/17 34/66/17 35/67/17 36/68/17
f 37/69/18 38/70/18 39/71/18 40/72/18
f 35/73/19 34/74/19 39/75/19 38/76/19
f 37/77/20 40/78/20 33/79/20 36/80/20
f 5/81/21 8/82/21 1/83/21 4/84/21
f 3/85/22 2/86/22 7/87/22 6/88/22

View File

@ -0,0 +1,109 @@
o unknown
v 0.25 0.75 1
v 0.25 0.75 0
v 0.25 0.25 0
v 0.25 0.25 1
v 0.75 0.25 1
v 0.75 0.25 0
v 0.75 0.75 0
v 0.75 0.75 1
v 0 0.25 1
v 0 0.25 0
v 1 0.25 0
v 1 0.25 1
v 1 0.75 1
v 1 0.75 0
v 0 0.75 0
v 0 0.75 1
v 0.25 1 1
v 0.25 1 0
v 0.25 0 0
v 0.25 0 1
v 0.75 0 1
v 0.75 0 0
v 0.75 1 0
v 0.75 1 1
vt 0.8125 0.25
vt 0.8125 0
vt 0.9375 0
vt 0.9375 0.25
vt 0.5625 0.25
vt 0.5625 0
vt 0.6875 0
vt 0.6875 0.25
vt 0.3125 0.5
vt 0.3125 0.25
vt 0.4375 0.25
vt 0.4375 0.5
vt 0.0625 0.5
vt 0.0625 0.25
vt 0.1875 0.25
vt 0.1875 0.5
vt 0.25 0.5
vt 0.25 0.25
vt 0.5 0.25
vt 0.5 0.5
vt 0 0.5
vt 0 0.25
vt 0.25 0.25
vt 0.25 0.5
vt 0.25 0.1875
vt 0.25 0.0625
vt 0.5 0.0625
vt 0.5 0.1875
vt 0 0.1875
vt 0 0.0625
vt 0.25 0.0625
vt 0.25 0.1875
vt 0.75 0.25
vt 0.75 0
vt 1 0
vt 1 0.25
vt 0.5 0.25
vt 0.5 0
vt 0.75 0
vt 0.75 0.25
vt 0.3125 0.25
vt 0.3125 0
vt 0.4375 0
vt 0.4375 0.25
vt 0.0625 0.25
vt 0.0625 0
vt 0.1875 0
vt 0.1875 0.25
vt 0.0625 0.1875
vt 0.0625 0.0625
vt 0.1875 0.0625
vt 0.1875 0.1875
vt 0.3125 0.1875
vt 0.3125 0.0625
vt 0.4375 0.0625
vt 0.4375 0.1875
vn -1 0 0
vn 1 0 0
vn 0 -1 0
vn 0 1 0
vn 0 -1 0
vn 0 1 0
vn 0 0 -1
vn 0 0 1
vn -1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 0 1
vn 0 0 1
vn 0 0 -1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/2 6/6/2 7/7/2 8/8/2
f 4/9/3 3/10/3 6/11/3 5/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 9/17/5 10/18/5 11/19/5 12/20/5
f 13/21/6 14/22/6 15/23/6 16/24/6
f 10/25/7 15/26/7 14/27/7 11/28/7
f 12/29/8 13/30/8 16/31/8 9/32/8
f 17/33/9 18/34/9 19/35/9 20/36/9
f 21/37/10 22/38/10 23/39/10 24/40/10
f 19/41/11 18/42/11 23/43/11 22/44/11
f 21/45/12 24/46/12 17/47/12 20/48/12
f 5/49/13 8/50/13 1/51/13 4/52/13
f 3/53/14 2/54/14 7/55/14 6/56/14

View File

@ -7,6 +7,10 @@
.inputs = .{"cubyz:marble"},
.output = "cubyz:marble_bricks",
},
.{
.inputs = .{"cubyz:marble"},
.output = "2 cubyz:marble_wall",
},
.{
.inputs = .{"cubyz:glacite"},
.output = "cubyz:glacite_tile",
@ -15,6 +19,10 @@
.inputs = .{"cubyz:glacite"},
.output = "cubyz:glacite_bricks",
},
.{
.inputs = .{"cubyz:glacite"},
.output = "2 cubyz:glacite_wall",
},
.{
.inputs = .{"cubyz:stone"},
.output = "cubyz:stone_tile",
@ -23,6 +31,10 @@
.inputs = .{"cubyz:stone"},
.output = "cubyz:stone_bricks",
},
.{
.inputs = .{"cubyz:stone"},
.output = "2 cubyz:stone_wall",
},
.{
.inputs = .{"cubyz:sandstone"},
.output = "cubyz:sandstone_tile",
@ -31,6 +43,10 @@
.inputs = .{"cubyz:sandstone"},
.output = "cubyz:sandstone_bricks",
},
.{
.inputs = .{"cubyz:sandstone"},
.output = "2 cubyz:sandstone_wall",
},
.{
.inputs = .{"cubyz:limestone"},
.output = "cubyz:limestone_tiles",
@ -39,6 +55,10 @@
.inputs = .{"cubyz:limestone"},
.output = "cubyz:limestone_bricks",
},
.{
.inputs = .{"cubyz:limestone"},
.output = "2 cubyz:limestone_wall",
},
.{
.inputs = .{"cubyz:basalt"},
.output = "cubyz:basalt_tile",
@ -47,12 +67,32 @@
.inputs = .{"cubyz:basalt"},
.output = "cubyz:basalt_bricks",
},
.{
.inputs = .{"cubyz:basalt"},
.output = "2 cubyz:basalt_wall",
},
.{
.inputs = .{"cubyz:ferrock"},
.output = "cubyz:ferrock_tiles",
},
.{
.inputs = .{"cubyz:ferrock"},
.output = "cubyz:ferrock_bricks",
},
.{
.inputs = .{"cubyz:ferrock"},
.output = "2 cubyz:ferrock_wall",
},
.{
.inputs = .{"cubyz:void_stone"},
.output = "cubyz:void_stone_tile",
},
.{
.inputs = .{"cubyz:void_stone"},
.output = "cubyz:void_stone_bricks",
},
.{
.inputs = .{"cubyz:void_stone"},
.output = "2 cubyz:void_stone_wall",
},
},

View File

@ -219,14 +219,22 @@ pub const RotationModes = struct {
}
if(!data.isConnectedNegY and corner[1] == 0) {
corner[1] = 0.5;
if(@abs(quad.normal[2]) > 0.7) {
cornerUV[1] = 0.5;
} else {
cornerUV[0] = 0.5;
}
}
if(!data.isConnectedPosY and corner[1] == 1) {
corner[1] = 0.5;
if(@abs(quad.normal[2]) > 0.7) {
cornerUV[1] = 0.5;
} else {
cornerUV[0] = 0.5;
}
}
}
}
pub fn createBlockModel(modelId: []const u8) u16 {
if(fenceModels.get(modelId)) |modelIndex| return modelIndex;