Daymare Posted August 22, 2025 Report Posted August 22, 2025 I have an issue where the in-hand rendering of a transparent liquid container is differing from a placed block version. It uses wine.json as the base shape and wine-liquidcontents.json as the liquid contents. While it works fine when placed as a block: It has issues when held as an item, where the liquid only renders the top face: And strangely allows you to see through the player model: and removes other transparent blocks behind it (there are wine glasses behind it, but they cannot be seen): The block JSON is wineglass.json. Any ideas as to why this might be happening? I know transparency is a chronically difficult issue in game dev, but I'm particularly confused as to why it works fine as a block but not in-hand. Is there some kind of override for rendering items when held?
xXx_Ape_xXx Posted August 22, 2025 Report Posted August 22, 2025 If you think that's weird, try holding a glass pane in your hands and look at yourself in 3'rd person 2
Daymare Posted August 22, 2025 Author Report Posted August 22, 2025 I see Seems like I'm dealing with forces beyond my comprehension then!
xXx_Ape_xXx Posted August 22, 2025 Report Posted August 22, 2025 Are we no more than a mere hallucination in this world? Some kind of sentient being from long past, floating trough time as a shadow of what once was? I think I need a glass of wine now... 1
Echo Weaver Posted August 22, 2025 Report Posted August 22, 2025 It looks like you solved your earlier problem with wild cards! Those look sharp. I won't pretend I have any input on your actual problem.
Daymare Posted August 22, 2025 Author Report Posted August 22, 2025 21 minutes ago, Echo Weaver said: Those look sharp. Thanks! I'm planning to release the mod soon, just need to do some playtesting to make sure it all works as intended. 21 minutes ago, Echo Weaver said: It looks like you solved your earlier problem with wild cards! Not gonna lie, I actually just separated each type of cup into its own JSON file. It meant I didn't need to deal with the issue with the texturesByType, or with loads of wildcards. It also reduced the mass of different variant combinations I could potentially have (I had a variant for type, material, and color meaning I had to list all the allowed/not allowed variants. Now I just have color and the type/material are inherent). I also got annoyed trying to set the liquidcontainer shapes for contents etc for different variants, since 'ByType' didn't seem to like those sections, and making a different attributes section per variant type seemed excessive. It did end up making it slightly more bloated in terms of the number of files, but overall I feel like it simplified things somewhat. I do think my original issue with the texturesByType was because I missed that I had repeated it though. 1
Recommended Posts