Java Code Examples for net.minecraft.init.Blocks#CAULDRON

The following examples show how to use net.minecraft.init.Blocks#CAULDRON . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: TofuCraftReload   File:    License: MIT License 6 votes vote down vote up
 * gets the water Level of the cauldron above this block
 * @return water level. 0-3, int.
 * If there is no cauldron, returns negative value. -1, -2: must put fire one/two blck above, -3: inflammable
public int getCauldronStatus() {
    IBlockState stateUp =;
    if (stateUp.getBlock() == Blocks.CAULDRON)
        return stateUp.getValue(BlockCauldron.LEVEL);
    else {
        Block block = stateUp.getBlock();
        if (block.isAir(stateUp, world, this.getPos().up()) || block == Blocks.FIRE) return -1;
        else if (!block.getMaterial(stateUp).getCanBurn()) return -3;
        else {
            IBlockState state2Up =;
            if (state2Up.getBlock().isAir(state2Up, world, this.pos.up(2))) return -2;
            else return -3;
Example 2
Source Project: TofuCraftReload   File:    License: MIT License 5 votes vote down vote up
private void updateCauldronStatus() {
    int stat = this.getCauldronStatus();

    if (this.lastCauldronStatus != stat && == Blocks.CAULDRON) {
        int metadata =;
        IBlockState newMetadata = Blocks.CAULDRON.getDefaultState().withProperty(BlockCauldron.LEVEL, metadata);, newMetadata, 2);
        this.lastCauldronStatus = stat;