Jump to content

Recommended Posts

Posted (edited)

hey, im deving a mod, it allows mark the blocks and to make them less alpha. but idk how to translucent on render block, i just passed render the marked blocks but no thought to translucent them, some1 have a better idea? thanks!

Edited by duyms
Posted

if its like the glass block 
you need to declare the block whit the .noOcclusion() thing 

	public static final RegistryObject<Block> GLASS_MESH_PANEL = registerBlock("glass_mesh_panel",
            () -> new glass_mesh(Block.Properties.copy(Blocks.IRON_BARS).noOcclusion() ));
	

 

an in the json model file must have 

        "ambientocclusion": "true",
        "render_type": "cutout",  
 

 

Spoiler

				
			{
		    "credit": "Made with Blockbench",
		    "parent": "mercblk:block/parent/display/trampilla_display",
		        "ambientocclusion": "true",
		        "render_type": "cutout",  
		    
		    "textures": {
		        "north": "mercblk:item/surface/mesh",
		        "south": "mercblk:item/surface/iron",
		        "particle": "#south"
		    },
		    "elements": [
		        {
		            "name": "poste_izq",
		            "from": [14.35, 0, -0.1],
		            "to": [16.1, 16, 1.65],
		            "rotation": {"angle": 0, "axis": "y", "origin": [15, 8, 2]},
		            "faces": {
		                "north": {"uv": [4, 0, 5.75, 16], "texture": "#south"},
		                "east": {"uv": [0, 0, 1.75, 16], "texture": "#south"},
		                "south": {"uv": [10, 0, 11.75, 16], "texture": "#south"},
		                "west": {"uv": [6, 0, 7.75, 16], "texture": "#south"},
		                "up": {"uv": [0, 0, 1.75, 1.75], "texture": "#south"},
		                "down": {"uv": [0, 0, 1.75, 1.75], "texture": "#south"}
		            }
		        },
		        {
		            "name": "poste_der",
		            "from": [0, 0, 0.25],
		            "to": [1, 16, 1.25],
		            "rotation": {"angle": 0, "axis": "y", "origin": [15.25, 8, 0.75]},
		            "faces": {
		                "north": {"uv": [4, 0, 6, 16], "texture": "#south"},
		                "east": {"uv": [0, 0, 4, 16], "texture": "#south"},
		                "south": {"uv": [10, 0, 12, 16], "texture": "#south"},
		                "west": {"uv": [6, 0, 10, 16], "texture": "#south"},
		                "up": {"uv": [0, 0, 2, 4], "texture": "#south"},
		                "down": {"uv": [0, 0, 2, 4], "texture": "#south"}
		            }
		        },
		        {
		            "name": "mesh",
		            "from": [0, 0, 0.5],
		            "to": [16, 16, 1],
		            "rotation": {"angle": 0, "axis": "y", "origin": [15.25, 8, 0.75]},
		            "faces": {
		                "north": {"uv": [0, 0, 16, 16], "texture": "#north"},
		                "east": {"uv": [0, 0, 0.25, 16], "texture": "#north"},
		                "south": {"uv": [16, 0, 0, 16], "texture": "#north"},
		                "west": {"uv": [15.75, 0, 16, 16], "texture": "#north"},
		                "up": {"uv": [0, 0, 16, 0.5], "texture": "#north"},
		                "down": {"uv": [0, 15.5, 16, 16], "texture": "#north"}
		            }
		        }
		    ],
		    "display": {}
		}
		 				
			

it you wanna get a texture whit a transparency at 50% or something 
i dont know how to do that an i wanna do the same but whit an entity im working on 

 

Posted
19 hours ago, perromercenary00 said:

if its like the glass block 
you need to declare the block whit the .noOcclusion() thing 

 

	public static final RegistryObject<Block> GLASS_MESH_PANEL = registerBlock("glass_mesh_panel",
            () -> new glass_mesh(Block.Properties.copy(Blocks.IRON_BARS).noOcclusion() ));
	

 

 

an in the json model file must have 

        "ambientocclusion": "true",
        "render_type": "cutout",  
 

 

  Reveal hidden contents

 

				
			{
		    "credit": "Made with Blockbench",
		    "parent": "mercblk:block/parent/display/trampilla_display",
		        "ambientocclusion": "true",
		        "render_type": "cutout",  
		    
		    "textures": {
		        "north": "mercblk:item/surface/mesh",
		        "south": "mercblk:item/surface/iron",
		        "particle": "#south"
		    },
		    "elements": [
		        {
		            "name": "poste_izq",
		            "from": [14.35, 0, -0.1],
		            "to": [16.1, 16, 1.65],
		            "rotation": {"angle": 0, "axis": "y", "origin": [15, 8, 2]},
		            "faces": {
		                "north": {"uv": [4, 0, 5.75, 16], "texture": "#south"},
		                "east": {"uv": [0, 0, 1.75, 16], "texture": "#south"},
		                "south": {"uv": [10, 0, 11.75, 16], "texture": "#south"},
		                "west": {"uv": [6, 0, 7.75, 16], "texture": "#south"},
		                "up": {"uv": [0, 0, 1.75, 1.75], "texture": "#south"},
		                "down": {"uv": [0, 0, 1.75, 1.75], "texture": "#south"}
		            }
		        },
		        {
		            "name": "poste_der",
		            "from": [0, 0, 0.25],
		            "to": [1, 16, 1.25],
		            "rotation": {"angle": 0, "axis": "y", "origin": [15.25, 8, 0.75]},
		            "faces": {
		                "north": {"uv": [4, 0, 6, 16], "texture": "#south"},
		                "east": {"uv": [0, 0, 4, 16], "texture": "#south"},
		                "south": {"uv": [10, 0, 12, 16], "texture": "#south"},
		                "west": {"uv": [6, 0, 10, 16], "texture": "#south"},
		                "up": {"uv": [0, 0, 2, 4], "texture": "#south"},
		                "down": {"uv": [0, 0, 2, 4], "texture": "#south"}
		            }
		        },
		        {
		            "name": "mesh",
		            "from": [0, 0, 0.5],
		            "to": [16, 16, 1],
		            "rotation": {"angle": 0, "axis": "y", "origin": [15.25, 8, 0.75]},
		            "faces": {
		                "north": {"uv": [0, 0, 16, 16], "texture": "#north"},
		                "east": {"uv": [0, 0, 0.25, 16], "texture": "#north"},
		                "south": {"uv": [16, 0, 0, 16], "texture": "#north"},
		                "west": {"uv": [15.75, 0, 16, 16], "texture": "#north"},
		                "up": {"uv": [0, 0, 16, 0.5], "texture": "#north"},
		                "down": {"uv": [0, 15.5, 16, 16], "texture": "#north"}
		            }
		        }
		    ],
		    "display": {}
		}
		 				
			

 

it you wanna get a texture whit a transparency at 50% or something 
i dont know how to do that an i wanna do the same but whit an entity im working on 

 

in fact, i not want reg a new block. just inject something in vanilla block render to make vanilla block to translucent 50%

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.