EntitySetTag, MaterialSetTagpublic abstract class BaseTag<T extends Keyed,C extends BaseTag<T,C>> extends Object implements Tag<T>
| Modifier and Type | Field | Description |
|---|---|---|
protected NamespacedKey |
key |
|
protected Set<T> |
tagged |
ACACIA_LOGS, ANVIL, BAMBOO_PLANTABLE_ON, BANNERS, BEACON_BASE_BLOCKS, BEDS, BEE_GROWABLES, BEEHIVES, BIRCH_LOGS, BUTTONS, CAMPFIRES, CARPETS, CLIMBABLE, CORAL_BLOCKS, CORAL_PLANTS, CORALS, CRIMSON_STEMS, CROPS, DARK_OAK_LOGS, DOORS, DRAGON_IMMUNE, ENDERMAN_HOLDABLE, FENCE_GATES, FENCES, FIRE, FLOWER_POTS, FLOWERS, FLUIDS_LAVA, FLUIDS_WATER, GOLD_ORES, GUARDED_BY_PIGLINS, HOGLIN_REPELLENTS, ICE, IMPERMEABLE, INFINIBURN_END, INFINIBURN_NETHER, INFINIBURN_OVERWORLD, ITEMS_ARROWS, ITEMS_BANNERS, ITEMS_BEACON_PAYMENT_ITEMS, ITEMS_BOATS, ITEMS_COALS, ITEMS_CREEPER_DROP_MUSIC_DISCS, ITEMS_FISHES, ITEMS_FURNACE_MATERIALS, ITEMS_LECTERN_BOOKS, ITEMS_MUSIC_DISCS, ITEMS_PIGLIN_LOVED, ITEMS_STONE_TOOL_MATERIALS, JUNGLE_LOGS, LEAVES, LOGS, LOGS_THAT_BURN, NON_FLAMMABLE_WOOD, NYLIUM, OAK_LOGS, PIGLIN_REPELLENTS, PLANKS, PORTALS, PRESSURE_PLATES, PREVENT_MOB_SPAWNING_INSIDE, RAILS, REGISTRY_BLOCKS, REGISTRY_FLUIDS, REGISTRY_ITEMS, SAND, SAPLINGS, SHULKER_BOXES, SIGNS, SLABS, SMALL_FLOWERS, SOUL_FIRE_BASE_BLOCKS, SOUL_SPEED_BLOCKS, SPRUCE_LOGS, STAIRS, STANDING_SIGNS, STONE_BRICKS, STONE_PRESSURE_PLATES, STRIDER_WARM_BLOCKS, TALL_FLOWERS, TRAPDOORS, UNDERWATER_BONEMEALS, UNSTABLE_BOTTOM_CENTER, VALID_SPAWN, WALL_CORALS, WALL_POST_OVERRIDE, WALL_SIGNS, WALLS, WARPED_STEMS, WART_BLOCKS, WITHER_IMMUNE, WITHER_SUMMON_BASE_BLOCKS, WOODEN_BUTTONS, WOODEN_DOORS, WOODEN_FENCES, WOODEN_PRESSURE_PLATES, WOODEN_SLABS, WOODEN_STAIRS, WOODEN_TRAPDOORS, WOOL| Constructor | Description |
|---|---|
BaseTag(Class<T> clazz,
NamespacedKey key,
Collection<T> values) |
|
BaseTag(Class<T> clazz,
NamespacedKey key,
Collection<T> values,
Predicate<T>... globalPredicates) |
|
BaseTag(Class<T> clazz,
NamespacedKey key,
Predicate<T> filter) |
|
BaseTag(Class<T> clazz,
NamespacedKey key,
T... values) |
| Modifier and Type | Method | Description |
|---|---|---|
C |
add(Collection<T> collection) |
|
C |
add(Predicate<T> filter) |
|
C |
add(Tag<T>... tags) |
|
C |
add(T... values) |
|
C |
contains(String with) |
|
C |
endsWith(String with) |
|
C |
ensureSize(String label,
int size) |
|
protected abstract Set<T> |
getAllPossibleValues() |
|
NamespacedKey |
getKey() |
Return the namespaced identifier for this object.
|
protected abstract String |
getName(T value) |
|
Set<T> |
getValues() |
Gets an immutable set of all tagged items.
|
boolean |
isTagged(T item) |
Returns whether or not this tag has an entry for the specified item.
|
C |
not(Collection<T> values) |
|
C |
not(Predicate<T> filter) |
|
C |
not(Tag<T>... tags) |
|
C |
not(T... values) |
|
C |
notContains(String with) |
|
C |
notEndsWith(String with) |
|
C |
notStartsWith(String with) |
|
C |
startsWith(String with) |
protected final NamespacedKey key
public BaseTag(@NotNull Class<T> clazz, @NotNull NamespacedKey key, @NotNull Predicate<T> filter)
public BaseTag(@NotNull Class<T> clazz, @NotNull NamespacedKey key, @NotNull Collection<T> values)
@NotNull public NamespacedKey getKey()
Keyed@NotNull public Set<T> getValues()
Tagpublic boolean isTagged(@NotNull T item)
Tag@NotNull public C add(@NotNull Collection<T> collection)
@NotNull public C not(@NotNull Collection<T> values)
Copyright © 2021. All rights reserved.