Java Code Examples for net.minecraft.tag.Tag#Identified
The following examples show how to use
net.minecraft.tag.Tag#Identified .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TagRegistry.java From multiconnect with MIT License | 5 votes |
public final void addTag(Tag.Identified<T> tag, Tag.Identified<T> otherTag) { Set<T> value = get(otherTag.getId()); if (value != null) { add(tag, value); } else { add(tag); } }
Example 2
Source File: TagRegistry.java From multiconnect with MIT License | 4 votes |
@SafeVarargs public final void add(Tag.Identified<T> tag, T... things) { add(tag, Arrays.asList(things)); }
Example 3
Source File: TagRegistry.java From multiconnect with MIT License | 4 votes |
public final void add(Tag.Identified<T> tag, Collection<T> things) { computeIfAbsent(tag.getId(), k -> new HashSet<>()).addAll(things); }
Example 4
Source File: AbstractProtocol.java From multiconnect with MIT License | 4 votes |
protected void copyBlocks(TagRegistry<Item> tags, TagRegistry<Block> blockTags, Tag.Identified<Item> tag, Tag.Identified<Block> blockTag) { tags.add(tag, Collections2.transform(blockTags.get(blockTag.getId()), Block::asItem)); }