Item Registry Test is now functional

This commit is contained in:
MattBDev
2019-09-19 14:56:03 -04:00
parent 16e24a2400
commit c926cddbd6
4 changed files with 15 additions and 14 deletions

View File

@ -20,21 +20,20 @@
package com.sk89q.worldedit.bukkit;
import com.sk89q.worldedit.world.item.ItemType;
import com.sk89q.worldedit.world.item.ItemTypes;
import org.bukkit.Material;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class ItemRegistryTest {
@Test
public void testTreeTypeMapping() {
public void testItemRegistry() {
for (Material material : Material.values()) {
if (material.isItem() && !material.isLegacy()) {
ItemType.REGISTRY.register(material.getKey().toString(), new ItemType(material.getKey().toString()));
System.out.println(material.getKey().toString());
}
}
System.out.println(ItemType.REGISTRY.getKnownNamespaces().toString());
Assertions.assertNotNull(ItemType.REGISTRY.get("minecraft:wooden_axe"));
}
}