#Custom glass block (non experimental)

1 messages · Page 1 of 1 (latest)

maiden flare
#

Is there any way of achieving glass like see through effect without using holiday creator features?

upper marten
#

I think material_instances aren't experimental anymore, you can just use blend as the render_method

maiden flare
# upper marten I think material_instances aren't experimental anymore, you can just use blend a...

That's what I did, but the rendering is not the same like for glass - transparency adds up with each block making it not see through after few blocks, while for glass it doesn't matter how many of them you place next to each other, you will be able to see through them either way. It's true that minecraft:material_instances are not experimental anymore, but minecraft:unit_cube still is... Isn't there a way to make it work without using minecraft:unit_cube + without HCF?

{
    "format_version": "1.20.10",
    "minecraft:block": {
        "description": {
            "identifier": "nogard:transparent_stone"
        },
        "components": {
            "minecraft:unit_cube": {},
            "minecraft:destructible_by_mining": {
                "seconds_to_destroy": 0.1
            },
            "minecraft:destructible_by_explosion": true,
            "minecraft:material_instances": {
                "*": {
                    "texture": "transparent_stone",
                    "render_method": "blend"
                }
            },
            "minecraft:light_dampening": 0
        }
    }
}```
upper marten
#

I see, you could add 6 properties that disable the face that has another glass like block next to it, but since you need it none experimental you could use execute command and make 64 commands in a function to cover all possible outcomes.
so like
"execute if block ~~~-1 nogard:transparent_stone ["nogard:north"=false,"nogard:south"=false,...]"

I can help you minimize the run commands, but about Unit cube, I didn't knew it's still exp, make your own block-model in blockbench

#

geometries should be out

maiden flare
# upper marten geometries should be out

Mhm, that's what I thought of making, using "custom model" for 1x1x1 block. xd
Whew, 64 commands for each block, that sounds pretty complex. How often would these commands have to run?

upper marten
#

every tick, but commands, especially in a function don't cause lag really, I've made machine which run like 100 commands each tick, and it only lagged if spam them every where, but I think we can simplify it

#

you could trade the amount of run commands with the amount of functions you make. I can imagine there to be 128 functions, that cover enabling, and disabling a side, and then you only run 12 commands from your block, 2 for each side

#

I can definitely suggest using the exp query, since it makes it so much easier🦐

maiden flare
upper marten
#

query.block_neighbor_has_any_tag

#

the basic idea here is to make a connecting block, and that's not simple in non exp rn, using that query I'm abled to make my block dynamically connect with just this event:

            "test": {
                "set_block_property": {
                    "mashiene:connect_north": "query.block_neighbor_has_any_tag(0,0,-1,'mashiene:signal_wire_connect_south','mashiene:signal_wire_connect')",
                    "mashiene:connect_south": "query.block_neighbor_has_any_tag(0,0,1,'mashiene:signal_wire_connect_north','mashiene:signal_wire_connect')",
                    "mashiene:connect_east": "query.block_neighbor_has_any_tag(1,0,0,'mashiene:signal_wire_connect_west','mashiene:signal_wire_connect')",
                    "mashiene:connect_west": "query.block_neighbor_has_any_tag(-1,0,0,'mashiene:signal_wire_connect_east','mashiene:signal_wire_connect')",
                    "mashiene:connect_up": "query.block_neighbor_has_any_tag(0,1,0,'mashiene:signal_wire_connect_down','mashiene:signal_wire_connect')",
                    "mashiene:connect_down": "query.block_neighbor_has_any_tag(0,-1,0,'mashiene:signal_wire_connect_up','mashiene:signal_wire_connect')"
maiden flare
#

I tried on lower end mobile phone to run roughly 5k commands every tick and actually while there weren't any lags, the command execution was delayed, which is a deal breaker tho.

upper marten
#

ya I know, it's more the server that lags than the actual fps dropping, but that's the only way I can imagine it to work rn. I don't know how scripts are with non exp, but that could be a try. But I can't help in that field

#

you might just have to run/write a ron of commands

#

ya could also try to automate the writing process with python if you have experience with that

maiden flare
foggy lark
maiden flare
upper marten
#

wait I think that not using exp

#

didn't knew it's that easy

#

it does, that's sick

maiden flare
upper marten
#

not I did, the tutorial is right, you literally just give it texture in blocks.json and use material_instances of blend, just not a texture there

#

custom glass tutorial got update ig, don't remember it being that easy

maiden flare
#

So, it's using HCF. :/

upper marten
#

Material instances aren't exp?

#

I thought

maiden flare
#

Wait, is the entire solution using HCF or not? Do u have the switch turned on?

upper marten
#

lemme try without, got a habit to turn all on

maiden flare
#

Haha, okay.

upper marten
#

it doesn't

foggy lark
#

only unit_cube, traits and events (including minecraft:on_* triggers) are experimental

maiden flare
maiden flare