Fixes a collision between the test enchantments
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2023-01-28 09:20:27 +01:00
parent c84c2cf30e
commit faff982585
2 changed files with 7 additions and 7 deletions

View File

@ -93,7 +93,7 @@ public enum SmithPresetFilter {
HELMET(false, "_HELMET"), HELMET(false, "_HELMET"),
/** /**
* Filters to only include chestplates * Filters to only include chest-plates
*/ */
CHESTPLATE(false, "_CHESTPLATE"), CHESTPLATE(false, "_CHESTPLATE"),

View File

@ -19,14 +19,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/ */
public class TypeValidatorHelperTest { public class TypeValidatorHelperTest {
private static Enchantment curseOfBinding; private static Enchantment infinity;
@BeforeAll @BeforeAll
public static void setUp() { public static void setUp() {
//Note: When not testing against a real server, no default enchantments are loaded! //Note: When not testing against a real server, no default enchantments are loaded!
curseOfBinding = new EnchantmentMock(NamespacedKey.minecraft("binding_curse"), infinity = new EnchantmentMock(NamespacedKey.minecraft("arrow_infinite"),
"CURSE_OF_BINDING"); "INFINITY");
Enchantment.registerEnchantment(curseOfBinding); Enchantment.registerEnchantment(infinity);
} }
@Test @Test
@ -155,8 +155,8 @@ public class TypeValidatorHelperTest {
@Test @Test
public void isValidEnchantmentValidTest() { public void isValidEnchantmentValidTest() {
SettingValueType type = SettingValueType.ENCHANTMENT; SettingValueType type = SettingValueType.ENCHANTMENT;
assertTrue(TypeValidationHelper.isValid(type, curseOfBinding, null)); assertTrue(TypeValidationHelper.isValid(type, infinity, null));
assertTrue(TypeValidationHelper.isValid(type, "binding_curse", null)); assertTrue(TypeValidationHelper.isValid(type, "arrow_infinite", null));
} }
@Test @Test