Update CraftBukkit to Minecraft 1.7.2

By: mbax <matt@phozop.net>
This commit is contained in:
CraftBukkit/Spigot
2013-11-04 07:07:38 -06:00
parent 5961c3b788
commit 5783df9d13
63 changed files with 1137 additions and 429 deletions

View File

@@ -5,6 +5,7 @@ import static org.hamcrest.Matchers.*;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.bukkit.Material;
import org.bukkit.inventory.ItemFactory;
@@ -21,7 +22,20 @@ import org.junit.runners.Parameterized.Parameters;
public class FactoryItemMaterialTest extends AbstractTestingBase {
static final ItemFactory factory = CraftItemFactory.instance();
static final StringBuilder buffer = new StringBuilder();
static final Material[] materials = Material.values();
static final Material[] materials;
static {
Material[] local_materials = Material.values();
List<Material> list = new ArrayList<Material>(local_materials.length);
for (Material material : local_materials) {
if (INVALIDATED_MATERIALS.contains(material)) {
continue;
}
list.add(material);
}
materials = list.toArray(new Material[list.size()]);
}
static String name(Enum<?> from, Enum<?> to) {
if (from.getClass() == to.getClass()) {

View File

@@ -13,7 +13,7 @@ public class NMSCraftItemStackTest extends AbstractTestingBase {
@Test
public void testCloneEnchantedItem() throws Exception {
net.minecraft.server.ItemStack nmsItemStack = new net.minecraft.server.ItemStack(net.minecraft.server.Item.POTION);
net.minecraft.server.ItemStack nmsItemStack = new net.minecraft.server.ItemStack(net.minecraft.server.Items.POTION);
nmsItemStack.addEnchantment(Enchantment.DAMAGE_ALL, 1);
ItemStack itemStack = CraftItemStack.asCraftMirror(nmsItemStack);
ItemStack clone = itemStack.clone();