Fusion (Connected Textures)

Fusion (Connected Textures)

27M Downloads

Making connected glass panes work in resource pack?

gittibene opened this issue ยท 2 comments

commented

Hey,

I've been trying to get this to work and I`m not sure what I'm doing wrong.

My goal is to make stained glass panes connect seamlessly with Fusion, like you did with your custom panes in the connected glass mod. I made a similar setup with custom "template_glass_pane" models and Fusion models for the sides of the pane that look like this:

{
  "type": "fusion:connecting",
  "parent": "customstainedglass:block/template_glass_pane_side",
  "connections": {
    "type": "fusion:or",
    "predicates": [
      {
        "type": "fusion:is_same_block"
      }
    ]
  },
  "loader": "fusion:model",
  "textures": {
    "edge": "minecraft:block/blue_stained_glass_pane_top",
    "pane": "minecraft:block/blue_stained_glass"
  }
}

This works from one side, but when looking at the pane from other sides the "pane_top" is still visible through the glass. Are you using custom code in your mod to make that work or am I missing something here?

commented

Are you using custom code in your mod to make that work

Yup, I wrap all the pane models and filter out the top quads in code. https://github.com/SuperMartijn642/ConnectedGlass/blob/c017f8e2dbf5991370c8f51c3b7d7ffbb5bbe9b5/src/main/java/com/supermartijn642/connectedglass/CGPaneBakedModel.java#L71.

This is somewhat of a vanilla limitation. Vanilla glass panes all also show top texture even if there's another pane above it.
It gets a bit complex since which of the bottom/top quads should be shown depends on the connections of pane above/below. Vanilla does deal with this for the iron bars block, but they just hide all bottom/top quads rather than the specific ones which does look a bit odd.

I couldn't really find a way to generalize this behaviour beyond specifically the glass pane block's properties and model, hence there's nothing for it in Fusion.
If you have access to code rather than just a resource pack, feel free to copy what I wrote for Connected Glass. You can just select the branch for the modloader and Minecraft version you're using.
If you have just a resource pack, than there's no way to cull the faces currently and I haven't really thought of something to solve it yet.

commented

Thanks a lot for your detailed reply and permission to copy your code. Unfortunately I'm kinda code illiterate and having a hard enough time understanding what the JSON files do. If you ever have the time to come up with a solution for resource pack makers it would be greatly appreciated!