Skip to content

shouldSideBeRendered method does not work when registering the block #354

@seferlian

Description

@seferlian

So I can't make the block invisible in water.

    @Override
    @SideOnly(Side.CLIENT)
    public boolean shouldSideBeRendered(IBlockState state, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
        BlockPos neighbourPos = pos.offset(side);
        IBlockState neighbourState = blockAccess.getBlockState(neighbourPos);
        if (neighbourState.getBlock() == Blocks.WATER || neighbourState.getBlock() == state.getBlock()) {
            return false;
        }
        return super.shouldSideBeRendered(state, blockAccess, pos, side);
    }

Also, the onEntityCollidedWithBlock event does not work, and most likely, the onEntityWalking event does not work either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions