SpongePowered/SpongeAPI — pull request #235 by sk89q (2014-11-26 10:11:10+00:00)
Title: Change Block to Voxel

**This branch is primarily for discussion.**

There was some disagreement as to what `Block` should be called.

The problem stems from the fact that the MCP and Bukkit diverged on what to name things.

## Block from Bukkit's PoV

`Block` in Bukkit (and currently in Sponge) is essentially a value type containing `World` (actually `Extent`) + `Vector3i`. *It refers to a specific integer location in a `World` (or `Extent` rather).*

```java
class Block {
World world;
Vector3i position;
}
```

(An `Extent` is a parent type of `World`. An `Extent` contains blocks, entities, biomes, and so on. It *could* refer to a specific area of a `World`, or it could be a virtual area such as a copy of an area of the world. It is similar to `IBlockAccess` from MCP but contains biomes and entity too.)

Here's some examples of Bukkit's `Block`:

```java
Block block = world.getBlockAt(0, 0, 0);
block.setType(Material.GLASS);
```

## Block from MCP's PoV

`Block` in MCP is a block type. Here are some examples of `Block` being used:

```java
Block.brick.harvestBlock(world, entity, x, y, z, d);
```

MC does not have an equivalent of Bukkit's `Block` and instead you access blocks on the world like so:

```java
world.setBlock(x, y, z, block, flag);
```

## How it is currently in Sponge

Currently, `Block` was chosen for consistency reasons. See the tables below.

### Blocks

| Project | Type | Instance | Snapshot |
| ------------- | ------------- | ----- |
| Sponge | BlockType | Block | BlockSnapshot |
| Bukkit | Material | Block | BlockState |
| MCP | Block | n/a | n/a |

### Entities

| Project | Type | Instance | Snapshot |
| ------------- | ------------- | ----- |
| Sponge | EntityType | Entity | EntitySnapshot |
| Bukkit | EntityType | Entity | n/a |
| MCP | Class | Entity | n/a |

## Other considerations

* The need for a block position object to work with blocks does mean extra work for the GC, but if needed, we can add methods to `Extent` that take x, y, z coordinates, bypassing `Block` entirely.
* Bukkit developers are more familiar with `Block` from Bukkit.
* Having `Block` named so confuses the hell out of those more familiar with MCP's convention.

## Alternatives to `Block`

* `Voxel`
* `BlockLocation`
* `BlockLoc`

We can also leave `Block` named as `Block`.