Added convenience Methods to TagAPI
This commit is contained in:
parent
49a47de5f8
commit
a62e3a5980
1 changed files with 30 additions and 0 deletions
|
@ -28,6 +28,14 @@ public class TagAPI {
|
|||
private static final Map<ResourceLocation, Set<ResourceLocation>> TAGS_BLOCK = Maps.newConcurrentMap();
|
||||
private static final Map<ResourceLocation, Set<ResourceLocation>> TAGS_ITEM = Maps.newConcurrentMap();
|
||||
|
||||
// Vanilla Block Tags
|
||||
public static final ResourceLocation SOUL_SPEED_BLOCKS = new ResourceLocation("soul_speed_blocks");
|
||||
public static final ResourceLocation SOUL_FIRE_BASE_BLOCKS = new ResourceLocation("soul_fire_base_blocks");
|
||||
public static final ResourceLocation CLIMBABLE = new ResourceLocation("climbable");
|
||||
public static final ResourceLocation NYLIUM = new ResourceLocation("nylium");
|
||||
public static final ResourceLocation ANVIL = new ResourceLocation("anvil");
|
||||
public static final ResourceLocation WALLS = new ResourceLocation("walls");
|
||||
|
||||
// Block Tags
|
||||
public static final Tag.Named<Block> BLOCK_BOOKSHELVES = makeCommonBlockTag("bookshelves");
|
||||
public static final Tag.Named<Block> BLOCK_GEN_TERRAIN = makeBlockTag(BCLib.MOD_ID, "gen_terrain");
|
||||
|
@ -165,6 +173,17 @@ public class TagAPI {
|
|||
addItemTag(ITEM_FURNACES.getName(), Blocks.FURNACE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds multiple Tags to one Block.
|
||||
* @param tagIDs array of {@link ResourceLocation} tag IDs.
|
||||
* @param block The {@link Block} to add tag.
|
||||
*/
|
||||
public static void addBlockTags(Block block, ResourceLocation... tagIDs) {
|
||||
for (ResourceLocation tagID : tagIDs) {
|
||||
addBlockTag(tagID, block);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds one Tag to multiple Blocks.
|
||||
* @param tagID {@link ResourceLocation} tag ID.
|
||||
|
@ -180,6 +199,17 @@ public class TagAPI {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds multiple Tags to one Item.
|
||||
* @param tagIDs array of {@link ResourceLocation} tag IDs.
|
||||
* @param item The {@link Item} to add tag.
|
||||
*/
|
||||
public static void addItemTags(ItemLike item, ResourceLocation... tagIDs) {
|
||||
for (ResourceLocation tagID : tagIDs) {
|
||||
addItemTag(tagID, item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds one Tag to multiple Items.
|
||||
* @param tagID {@link ResourceLocation} tag ID.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue