Closed Teqed closed 10 months ago
It may be desirable for resource packs to add a different shape of computer block
I definitely don't want to limit the creativity of artists making resource packs, but I really would caution against this. This causes the collision/hit bounding box to be different to the model, which ends up being incredibly janky.
I don't think setting noOcclusion
is the right option here. As you say, this changes the behaviour of lighting, in a way which I don't think makes sense.
It might be possible to solve the culling by putting computers on one of the other render layers (probably cutout) - I'd need to check the code to make sure. This is already possible with Forge, but we could add support to Fabric. I fear the quad below the computer will be unlit though, would need to test.
Yeah, I'm afraid I don't see a good way to solve this. Block.shouldRenderFace
(which controls the culling) uses the same shape information as the lighting engine. There's no good way to stop culling without changing how light propagates.
Really, this is a limitation with Minecraft itself. One would see the same issues if trying to change the block model for any solid block. I think such a solution would have to come from Minecraft itself.
I definitely don't want to limit the creativity of artists making resource packs, but I really would caution against this. One would see the same issues if trying to change the block model for any solid block.
Agreed -- changing a model in such a way (from solid to non-solid) seems out of scope for just a resource pack, since it has functional impact that goes beyond aesthetic preference that you would want to be consistent between different clients.
Instead, perhaps an addon mod could create a new block that extends from existing computers but is a "Slim Computer" with a different model suitable for skinning in this way.
Thanks for having looked at this, I appreciate your time.
Optional occlusion:
It may be desirable for resource packs to add a different shape of computer block, which is non-solid, and should not occlude.
README.md
.I've committed a quick implementation for 1.19.2 at https://github.com/cc-tweaked/CC-Tweaked/compare/mc-1.19.2...Teqed:CC-Tweaked:mc-1.19.2 that disables occlusion for use with resource packs, without any configurability.