Update CraftBukkit to Minecraft 1.7.2
By: mbax <matt@phozop.net>
This commit is contained in:
parent
5961c3b788
commit
5783df9d13
63 changed files with 1137 additions and 429 deletions
|
@ -12,6 +12,8 @@ import org.bukkit.support.AbstractTestingBase;
|
|||
import org.junit.Test;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import java.util.Iterator;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
|
||||
public class MaterialTest extends AbstractTestingBase {
|
||||
|
||||
|
@ -19,14 +21,21 @@ public class MaterialTest extends AbstractTestingBase {
|
|||
public void verifyMapping() {
|
||||
Map<Integer, Material> materials = Maps.newHashMap();
|
||||
for (Material material : Material.values()) {
|
||||
if (INVALIDATED_MATERIALS.contains(material)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
materials.put(material.getId(), material);
|
||||
}
|
||||
materials.remove(0); // Purge air.
|
||||
|
||||
for (Item item : Item.byId) {
|
||||
Iterator<Item> items = Item.REGISTRY.iterator();
|
||||
|
||||
while (items.hasNext()) {
|
||||
Item item = items.next();
|
||||
if (item == null) continue;
|
||||
|
||||
int id = item.id;
|
||||
int id = CraftMagicNumbers.getId(item);
|
||||
String name = item.getName();
|
||||
|
||||
Material material = materials.remove(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue