-
Notifications
You must be signed in to change notification settings - Fork 38
/
AtumAPI.java
73 lines (62 loc) · 3.99 KB
/
AtumAPI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.teammetallurgy.atum.api;
import com.teammetallurgy.atum.Atum;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.ai.village.poi.PoiType;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
public class AtumAPI {
private static <T> ResourceKey<Registry<T>> createRegistryKey(String name) {
return ResourceKey.createRegistryKey(new ResourceLocation(Atum.MOD_ID, name));
}
public static class Tags {
//Flowers
public static final TagKey<Item> FLOWERS_WHITE = tag("forge", "flowers/white");
public static final TagKey<Item> FLOWERS_ORANGE = tag("forge", "flowers/orange");
public static final TagKey<Item> FLOWERS_MAGENTA = tag("forge", "flowers/magenta");
public static final TagKey<Item> FLOWERS_LIGHT_BLUE = tag("forge", "flowers/light_blue");
public static final TagKey<Item> FLOWERS_YELLOW = tag("forge", "flowers/yellow");
public static final TagKey<Item> FLOWERS_LIME = tag("forge", "flowers/lime");
public static final TagKey<Item> FLOWERS_PINK = tag("forge", "flowers/pink");
public static final TagKey<Item> FLOWERS_GRAY = tag("forge", "flowers/gray");
public static final TagKey<Item> FLOWERS_LIGHT_GRAY = tag("forge", "flowers/light_gray");
public static final TagKey<Item> FLOWERS_CYAN = tag("forge", "flowers/cyan");
public static final TagKey<Item> FLOWERS_PURPLE = tag("forge", "flowers/purple");
public static final TagKey<Item> FLOWERS_BLUE = tag("forge", "flowers/blue");
public static final TagKey<Item> FLOWERS_BROWN = tag("forge", "flowers/brown");
public static final TagKey<Item> FLOWERS_GREEN = tag("forge", "flowers/green");
public static final TagKey<Item> FLOWERS_RED = tag("forge", "flowers/red");
public static final TagKey<Item> FLOWERS_BLACK = tag("forge", "flowers/black");
public static final TagKey<Item> CROPS_EMMER = tag("forge", "crops/emmer");
public static final TagKey<Item> CROPS_FLAX = tag("forge", "crops/flax");
public static final TagKey<Item> DUSTS_BLAZE = tag("forge", "dusts/blaze");
public static final TagKey<Item> SUGAR_CANE = tag("forge", "sugar_cane");
public static final TagKey<Item> RELIC = tag(Atum.MOD_ID, "relic");
public static final TagKey<Item> RELIC_NON_DIRTY = tag(Atum.MOD_ID, "relic_non_dirty");
public static final TagKey<Item> TOOLTIP = tag(Atum.MOD_ID, "tooltip");
public static final TagKey<Block> BASE_STONE_ATUM = blockTag(Atum.MOD_ID, "base_stone_atum");
public static final TagKey<Block> INFINIBURN = blockTag(Atum.MOD_ID, "infiniburn");
public static final TagKey<Block> LIMESTONE_BRICKS = blockTag(Atum.MOD_ID, "limestone_bricks");
public static final TagKey<Block> LINEN_BLOCKS = blockTag(Atum.MOD_ID, "linen_blocks");
public static final TagKey<Block> SHRUB = blockTag(Atum.MOD_ID, "shrub");
public static final TagKey<Block> THREADED_BLOCKS = blockTag(Atum.MOD_ID, "threaded_blocks");
public static final TagKey<Block> SCAFFOLDING = blockTag("forge", "scaffolding");
public static final TagKey<PoiType> ACQUIRABLE_JOB_SITE = poiTag(Atum.MOD_ID, "acquirable_job_site");
public static TagKey<Item> tag(String modID, String name) {
return ItemTags.create(new ResourceLocation(modID, name));
}
public static TagKey<Block> blockTag(String modID, String name) {
return BlockTags.create(new ResourceLocation(modID, name));
}
public static TagKey<PoiType> poiTag(String modID, String name) {
return TagKey.create(Registries.POINT_OF_INTEREST_TYPE, new ResourceLocation(modID, name));
}
public static void init() {
}
}
}