Jump to content

[SOLVED][1.14.4]How do I make a block that looks like a cauldron?


tadano

Recommended Posts

I'm not very good at English, so I use machine translation.

 

I want to make a block that looks like a cauldron, but the water doesn't show up when I put water in it.

How do I get it to show up?

 

public class WoodenBucketBlock extends CauldronBlock {
    protected static final VoxelShape SHAPE = VoxelShapes.or(Block.makeCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D));

    public WoodenBucketBlock(){
        super(Properties.create(Material.WOOD, MaterialColor.BROWN).harvestTool(ToolType.AXE).hardnessAndResistance(2.0f));
    }

    public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
        return SHAPE;
    }

    public BlockRenderLayer getRenderLayer() {
        return BlockRenderLayer.CUTOUT;
    }
}

 

Edited by tadano
Link to comment
Share on other sites

I wrote the model using the model of the cauldron as a reference, and the water is now displayed, but it is gray.

How do I get the right color?

 

1704157539_.png.1fef82ea7653e958aceb9c570b450567.png

 

This is the model in the image state.

Spoiler

{
	"credit": "Made with Blockbench",
	"ambientocclusion": false,
	"textures": {
		"water": "block/water_still",
		"particle": "block/oak_planks",
		"side": "block/oak_planks",
		"rope": "block/melon_side"
	},
	"elements": [
		{
			"name": "wooden_bucket_west",
			"from": [1, 0, 2],
			"to": [2, 16, 14],
			"faces": {
				"north": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"east": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"south": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"west": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"up": {"uv": [0, 0, 1, 12], "texture": "#side"},
				"down": {"uv": [0, 0, 1, 12], "texture": "#side"}
			}
		},
		{
			"name": "wooden_bucket_east",
			"from": [14, 0, 2],
			"to": [15, 16, 14],
			"faces": {
				"north": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"east": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"south": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"west": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"up": {"uv": [0, 0, 1, 12], "texture": "#side"},
				"down": {"uv": [0, 0, 1, 12], "texture": "#side"}
			}
		},
		{
			"name": "wooden_bucket_north",
			"from": [2, 0, 1],
			"to": [14, 16, 2],
			"faces": {
				"north": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"east": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"south": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"west": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"up": {"uv": [0, 0, 12, 1], "texture": "#side"},
				"down": {"uv": [0, 0, 12, 1], "texture": "#side"}
			}
		},
		{
			"name": "wooden_bucket_south",
			"from": [2, 0, 14],
			"to": [14, 16, 15],
			"faces": {
				"north": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"east": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"south": {"uv": [0, 0, 12, 16], "texture": "#side"},
				"west": {"uv": [0, 0, 1, 16], "texture": "#side"},
				"up": {"uv": [0, 0, 12, 1], "texture": "#side"},
				"down": {"uv": [0, 0, 12, 1], "texture": "#side"}
			}
		},
		{
			"name": "wooden_bucket_botom",
			"from": [2, 0, 2],
			"to": [14, 1, 14],
			"faces": {
				"up": {"uv": [0, 0, 12, 12], "rotation": 90, "texture": "#side"},
				"down": {"uv": [0, 0, 12, 12], "texture": "#side"}
			}
		},
		{
			"name": "rope_n",
			"from": [1, 12, 0],
			"to": [15, 13, 1],
			"faces": {
				"north": {"uv": [0, 3, 2, 4], "rotation": 90, "texture": "#rope"},
				"east": {"uv": [8, 6, 9, 7], "texture": "#rope"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"}
			}
		},
		{
			"name": "rope_s",
			"from": [1, 12, 15],
			"to": [15, 13, 16],
			"faces": {
				"east": {"uv": [8, 6, 9, 7], "texture": "#rope"},
				"south": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"}
			}
		},
		{
			"name": "rope_w",
			"from": [0, 12, 1],
			"to": [2, 13, 15],
			"faces": {
				"north": {"uv": [0, 3, 2, 4], "rotation": 90, "texture": "#rope"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#rope"},
				"west": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 14], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 14], "rotation": 90, "texture": "#rope"}
			}
		},
		{
			"name": "rope_e",
			"from": [14, 12, 1],
			"to": [16, 13, 15],
			"faces": {
				"north": {"uv": [0, 3, 2, 4], "rotation": 90, "texture": "#rope"},
				"east": {"uv": [0, 6, 2, 7], "rotation": 90, "texture": "#rope"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 14], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 14], "texture": "#rope"}
			}
		},
		{
			"name": "rope_n",
			"from": [1, 9, 0],
			"to": [15, 10, 1],
			"faces": {
				"north": {"uv": [0, 3, 2, 4], "rotation": 90, "texture": "#rope"},
				"east": {"uv": [8, 6, 9, 7], "texture": "#rope"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"}
			}
		},
		{
			"name": "rope_s",
			"from": [1, 9, 15],
			"to": [15, 10, 16],
			"faces": {
				"east": {"uv": [8, 6, 9, 7], "texture": "#rope"},
				"south": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"west": {"uv": [0, 0, 1, 1], "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"}
			}
		},
		{
			"name": "rope_w",
			"from": [0, 9, 1],
			"to": [2, 10, 15],
			"faces": {
				"north": {"uv": [0, 3, 2, 4], "rotation": 90, "texture": "#rope"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#rope"},
				"west": {"uv": [0, 0, 2, 1], "rotation": 90, "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 14], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 14], "rotation": 90, "texture": "#rope"}
			}
		},
		{
			"name": "rope_e",
			"from": [14, 9, 1],
			"to": [16, 10, 15],
			"faces": {
				"north": {"uv": [0, 3, 2, 4], "rotation": 90, "texture": "#rope"},
				"east": {"uv": [0, 6, 2, 7], "rotation": 90, "texture": "#rope"},
				"south": {"uv": [0, 0, 2, 1], "texture": "#rope"},
				"up": {"uv": [0, 0, 2, 14], "rotation": 90, "texture": "#rope"},
				"down": {"uv": [0, 0, 2, 14], "texture": "#rope"}
			}
		},
		{
			"name": "water_still",
			"from": [2, 4, 2],
			"to": [14, 15, 14],
			"faces": {
				"up": {"texture": "#water", "tintindex": 0, "cullface": "up"}
			}
		}
	]
}

 

 

Link to comment
Share on other sites

The water texture is colored by the biome. You need to register your block as being colorized (this is a client-side-only thing that has to be done, search for IBlockColor if I remember the interface correctly).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 4 years later...

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.



×
×
  • Create New...

Important Information

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