Skip to main content

How to get the block id(python code)

Comments

1 comment

  • Magi Liu

    more common one:

    def inspect_block_at_pos(position):
            agent.teleport(position.add(pos(0, 1, 0)), WEST)
            what = agent.inspect(AgentInspection.BLOCK, DOWN)
            for i in range(1, 16):
                detail = 65536 * i + what
                if blocks.test_for_block(detail, pos(0, -1, 0)):
                    return detail
            return what
    0

Please sign in to leave a comment.