Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • Author
21 minutes ago, poopoodice said:

Check vanilla cauldron blockstate and models

I'll check it out.

Thank you!

  • Author

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"}
			}
		}
	]
}

 

 

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.

  • Author

I was able to add some color to it. The block is now complete.
Thank you all!

  • 4 years later...
On 4/18/2020 at 8:09 PM, Draco18s said:

 

So how you did it I found out how to Tint but I don't get how to register Event

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.