Skip to content

Commit ac90d00

Browse files
committed
Add conduit
1 parent 190af96 commit ac90d00

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/render/SpecialRenderer.ts

+23
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,26 @@ function wallSignRenderer(woodType: string) {
355355
}
356356
}
357357

358+
function conduitRenderer(atlas: TextureAtlasProvider) {
359+
const id = Identifier.create('conduit')
360+
return dummy(id, atlas, {}, new BlockModel(id, undefined, {
361+
0: 'entity/conduit/base',
362+
}, [
363+
{
364+
from: [5, 5, 5],
365+
to: [11, 11, 11],
366+
faces: {
367+
north: {uv: [3, 6, 6, 12], texture: '#0'},
368+
east: {uv: [0, 6, 3, 12], texture: '#0'},
369+
south: {uv: [9, 6, 12, 12], texture: '#0'},
370+
west: {uv: [6, 6, 9, 12], texture: '#0'},
371+
up: {uv: [6, 6, 3, 0], texture: '#0'},
372+
down: {uv: [9, 0, 6, 6], texture: '#0'},
373+
},
374+
},
375+
]).withUvEpsilon(1/128))
376+
}
377+
358378
function getStr(block: BlockState, key: string, fallback = '') {
359379
return block.getProperty(key) ?? fallback
360380
}
@@ -461,6 +481,9 @@ export namespace SpecialRenderers {
461481
mat4.translate(t, t, [-0.5, -0.5, -0.5])
462482
mesh.merge(wallSignMesh.transform(t))
463483
}
484+
if (block.is('conduit')) {
485+
mesh.merge(conduitRenderer(atlas))
486+
}
464487

465488
if (block.getProperties()['waterlogged'] === 'true') {
466489
mesh.merge(liquidRenderer('water', 0, atlas, cull, 0))

0 commit comments

Comments
 (0)