Skip to content

Commit

Permalink
Add c:obsidians/normal and c:obsidians/crying subtags (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt authored Sep 23, 2024
1 parent 600c870 commit 762725e
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/generated/resources/assets/c/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
"tag.block.c.hidden_from_recipe_viewers": "Hidden From Recipe Viewers",
"tag.block.c.netherracks": "Netherracks",
"tag.block.c.obsidians": "Obsidians",
"tag.block.c.obsidians.crying": "Crying Obsidians",
"tag.block.c.obsidians.normal": "Normal Obsidians",
"tag.block.c.ore_bearing_ground.deepslate": "Deepslate Ore Bearing Ground",
"tag.block.c.ore_bearing_ground.netherrack": "Netherrack Ore Bearing Ground",
"tag.block.c.ore_bearing_ground.stone": "Stone Ore Bearing Ground",
Expand Down Expand Up @@ -272,6 +274,8 @@
"tag.item.c.nuggets.gold": "Gold Nuggets",
"tag.item.c.nuggets.iron": "Iron Nuggets",
"tag.item.c.obsidians": "Obsidians",
"tag.item.c.obsidians.crying": "Crying Obsidians",
"tag.item.c.obsidians.normal": "Normal Obsidians",
"tag.item.c.ore_bearing_ground.deepslate": "Deepslate Ore Bearing Ground",
"tag.item.c.ore_bearing_ground.netherrack": "Netherrack Ore Bearing Ground",
"tag.item.c.ore_bearing_ground.stone": "Stone Ore Bearing Ground",
Expand Down
4 changes: 2 additions & 2 deletions src/generated/resources/data/c/tags/block/obsidians.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"values": [
"minecraft:obsidian",
"minecraft:crying_obsidian",
"#c:obsidians/normal",
"#c:obsidians/crying",
{
"id": "#forge:obsidian",
"required": false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:crying_obsidian"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:obsidian"
]
}
4 changes: 2 additions & 2 deletions src/generated/resources/data/c/tags/item/obsidians.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"values": [
"minecraft:obsidian",
"minecraft:crying_obsidian",
"#c:obsidians/normal",
"#c:obsidians/crying",
{
"id": "#forge:obsidian",
"required": false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:crying_obsidian"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:obsidian"
]
}
12 changes: 12 additions & 0 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ public static class Blocks {
public static final TagKey<Block> HIDDEN_FROM_RECIPE_VIEWERS = tag("hidden_from_recipe_viewers");
public static final TagKey<Block> NETHERRACKS = tag("netherracks");
public static final TagKey<Block> OBSIDIANS = tag("obsidians");
/**
* For common obsidian that has no special quirks or behaviors. Ideal for recipe use.
* Crying Obsidian, for example, is a light block and harder to obtain. So it gets its own tag instead of being under normal tag.
*/
public static final TagKey<Block> OBSIDIANS_NORMAL = tag("obsidians/normal");
public static final TagKey<Block> OBSIDIANS_CRYING = tag("obsidians/crying");
/**
* Blocks which are often replaced by deepslate ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_DEEPSLATE}, during world generation
*/
Expand Down Expand Up @@ -485,6 +491,12 @@ public static class Items {
public static final TagKey<Item> NUGGETS_GOLD = tag("nuggets/gold");
public static final TagKey<Item> NUGGETS_IRON = tag("nuggets/iron");
public static final TagKey<Item> OBSIDIANS = tag("obsidians");
/**
* For common obsidian that has no special quirks or behaviors. Ideal for recipe use.
* Crying Obsidian, for example, is a light block and harder to obtain. So it gets its own tag instead of being under normal tag.
*/
public static final TagKey<Item> OBSIDIANS_NORMAL = tag("obsidians/normal");
public static final TagKey<Item> OBSIDIANS_CRYING = tag("obsidians/crying");
/**
* Blocks which are often replaced by deepslate ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_DEEPSLATE}, during world generation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ public void addTags(HolderLookup.Provider p_256380_) {
tag(Tags.Blocks.SKULLS).add(Blocks.SKELETON_SKULL, Blocks.SKELETON_WALL_SKULL, Blocks.WITHER_SKELETON_SKULL, Blocks.WITHER_SKELETON_WALL_SKULL, Blocks.PLAYER_HEAD, Blocks.PLAYER_WALL_HEAD, Blocks.ZOMBIE_HEAD, Blocks.ZOMBIE_WALL_HEAD, Blocks.CREEPER_HEAD, Blocks.CREEPER_WALL_HEAD, Blocks.PIGLIN_HEAD, Blocks.PIGLIN_WALL_HEAD, Blocks.DRAGON_HEAD, Blocks.DRAGON_WALL_HEAD);
tag(Tags.Blocks.HIDDEN_FROM_RECIPE_VIEWERS);
tag(Tags.Blocks.NETHERRACKS).add(Blocks.NETHERRACK);
tag(Tags.Blocks.OBSIDIANS).add(Blocks.OBSIDIAN).add(Blocks.CRYING_OBSIDIAN);
tag(Tags.Blocks.OBSIDIANS_NORMAL).add(Blocks.OBSIDIAN);
tag(Tags.Blocks.OBSIDIANS_CRYING).add(Blocks.CRYING_OBSIDIAN);
tag(Tags.Blocks.OBSIDIANS).addTags(Tags.Blocks.OBSIDIANS_NORMAL, Tags.Blocks.OBSIDIANS_CRYING);
tag(Tags.Blocks.ORE_BEARING_GROUND_DEEPSLATE).add(Blocks.DEEPSLATE);
tag(Tags.Blocks.ORE_BEARING_GROUND_NETHERRACK).add(Blocks.NETHERRACK);
tag(Tags.Blocks.ORE_BEARING_GROUND_STONE).add(Blocks.STONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ public void addTags(HolderLookup.Provider lookupProvider) {
tag(Tags.Items.NUGGETS_IRON).add(Items.IRON_NUGGET);
tag(Tags.Items.NUGGETS_GOLD).add(Items.GOLD_NUGGET);
copy(Tags.Blocks.OBSIDIANS, Tags.Items.OBSIDIANS);
copy(Tags.Blocks.OBSIDIANS_NORMAL, Tags.Items.OBSIDIANS_NORMAL);
copy(Tags.Blocks.OBSIDIANS_CRYING, Tags.Items.OBSIDIANS_CRYING);
copy(Tags.Blocks.ORE_BEARING_GROUND_DEEPSLATE, Tags.Items.ORE_BEARING_GROUND_DEEPSLATE);
copy(Tags.Blocks.ORE_BEARING_GROUND_NETHERRACK, Tags.Items.ORE_BEARING_GROUND_NETHERRACK);
copy(Tags.Blocks.ORE_BEARING_GROUND_STONE, Tags.Items.ORE_BEARING_GROUND_STONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ protected void addTranslations() {
add(Tags.Blocks.NEEDS_GOLD_TOOL, "Needs Gold Tools");
add(Tags.Blocks.NEEDS_NETHERITE_TOOL, "Needs Netherite Tools");
add(Tags.Blocks.OBSIDIANS, "Obsidians");
add(Tags.Blocks.OBSIDIANS_NORMAL, "Normal Obsidians");
add(Tags.Blocks.OBSIDIANS_CRYING, "Crying Obsidians");
add(Tags.Blocks.ORE_BEARING_GROUND_DEEPSLATE, "Deepslate Ore Bearing Ground");
add(Tags.Blocks.ORE_BEARING_GROUND_NETHERRACK, "Netherrack Ore Bearing Ground");
add(Tags.Blocks.ORE_BEARING_GROUND_STONE, "Stone Ore Bearing Ground");
Expand Down Expand Up @@ -247,6 +249,8 @@ protected void addTranslations() {
add(Tags.Items.NUGGETS_IRON, "Iron Nuggets");
add(Tags.Items.NUGGETS_GOLD, "Gold Nuggets");
add(Tags.Items.OBSIDIANS, "Obsidians");
add(Tags.Items.OBSIDIANS_NORMAL, "Normal Obsidians");
add(Tags.Items.OBSIDIANS_CRYING, "Crying Obsidians");
add(Tags.Items.ORE_BEARING_GROUND_DEEPSLATE, "Deepslate Ore Bearing Ground");
add(Tags.Items.ORE_BEARING_GROUND_NETHERRACK, "Netherrack Ore Bearing Ground");
add(Tags.Items.ORE_BEARING_GROUND_STONE, "Stone Ore Bearing Ground");
Expand Down

0 comments on commit 762725e

Please sign in to comment.