2525package org .spongepowered .api .item .inventory .equipment ;
2626
2727import net .kyori .adventure .text .ComponentLike ;
28- import org .spongepowered .api .Sponge ;
2928import org .spongepowered .api .data .type .StringRepresentable ;
3029import org .spongepowered .api .registry .DefaultedRegistryValue ;
3130import org .spongepowered .api .util .annotation .CatalogedBy ;
3231
3332import java .util .Objects ;
34- import java .util .function .Predicate ;
3533import java .util .function .Supplier ;
3634
3735/**
4038@ CatalogedBy (EquipmentConditions .class )
4139public interface EquipmentCondition extends DefaultedRegistryValue <EquipmentCondition >, StringRepresentable , ComponentLike {
4240
43- /**
44- * Returns the most specific equipment condition for the given equipment type.
45- *
46- * @param type The equipment type
47- * @return The equipment condition
48- */
49- static EquipmentCondition byType (final Supplier <? extends EquipmentType > type ) {
50- return EquipmentCondition .byType (Objects .requireNonNull (type , "type" ).get ());
51- }
52-
53- /**
54- * Returns the most specific equipment condition for the given equipment type.
55- *
56- * @param type The equipment type
57- * @return The equipment condition
58- */
59- static EquipmentCondition byType (final EquipmentType type ) {
60- return Sponge .game ().factoryProvider ().provide (Factory .class ).byType (type );
61- }
62-
6341 /**
6442 * Tests whether the equipment type is suitable for this condition.
6543 *
@@ -77,9 +55,4 @@ default boolean test(final Supplier<? extends EquipmentType> type) {
7755 * @return True if the equipment type is suitable for this condition
7856 */
7957 boolean test (EquipmentType type );
80-
81- interface Factory {
82-
83- EquipmentCondition byType (EquipmentType type );
84- }
8558}
0 commit comments