Skip to content

Commit

Permalink
Move Storage Block Tags to Common namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph T. McQuigg <[email protected]>
  • Loading branch information
JT122406 committed Dec 25, 2024
1 parent d74274e commit 7f4dbb7
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- Correct BWG Pitcher Plant Item Models
- Slight Change to FruitBlockProcessor#finalizeProcessing to be more Efficient
- Add Config to Enable/Disable Spawning of Oddion and Man O War
- Add Storage Block Tags (Allium and Rose Petal Blocks)
- Add Storage Block Tags (Allium and Rose Petal Blocks) (#c name space)
- Fix BWG trades on NeoForge

# 2.2.5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"values": [
"#biomeswevegone:storage_blocks/allium",
"#biomeswevegone:storage_blocks/pink_allium",
"#biomeswevegone:storage_blocks/rose",
"#biomeswevegone:storage_blocks/white_allium"
"#c:storage_blocks/allium",
"#c:storage_blocks/pink_allium",
"#c:storage_blocks/rose",
"#c:storage_blocks/white_allium"
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"values": [
"#biomeswevegone:storage_blocks/allium",
"#biomeswevegone:storage_blocks/pink_allium",
"#biomeswevegone:storage_blocks/rose",
"#biomeswevegone:storage_blocks/white_allium"
"#c:storage_blocks/allium",
"#c:storage_blocks/pink_allium",
"#c:storage_blocks/rose",
"#c:storage_blocks/white_allium"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.potionstudios.biomeswevegone.tags;

import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block;
import net.potionstudios.biomeswevegone.BiomesWeveGone;
Expand Down Expand Up @@ -28,12 +29,16 @@ public class BWGBlockTags {
public static final TagKey<Block> DAFFODILS = create("flowers/daffodils");

/** Storage Blocks **/
public static final TagKey<Block> STORAGE_BLOCKS_ALLIUM = create("storage_blocks/allium");
public static final TagKey<Block> STORAGE_BLOCKS_PINK_ALLIUM = create("storage_blocks/pink_allium");
public static final TagKey<Block> STORAGE_BLOCKS_WHITE_ALLIUM = create("storage_blocks/white_allium");
public static final TagKey<Block> STORAGE_BLOCKS_ROSE = create("storage_blocks/rose");
public static final TagKey<Block> STORAGE_BLOCKS_ALLIUM = createCommon("storage_blocks/allium");
public static final TagKey<Block> STORAGE_BLOCKS_PINK_ALLIUM = createCommon("storage_blocks/pink_allium");
public static final TagKey<Block> STORAGE_BLOCKS_WHITE_ALLIUM = createCommon("storage_blocks/white_allium");
public static final TagKey<Block> STORAGE_BLOCKS_ROSE = createCommon("storage_blocks/rose");

private static TagKey<Block> create(String name) {
return TagKey.create(Registries.BLOCK, BiomesWeveGone.id(name));
}

private static TagKey<Block> createCommon(String name) {
return TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", name));
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.potionstudios.biomeswevegone.tags;

import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.potionstudios.biomeswevegone.BiomesWeveGone;
Expand Down Expand Up @@ -29,10 +30,10 @@ public class BWGItemTags {
public static final TagKey<Item> GLOWCANE_POWDER = create("glowcane_powder");
public static final TagKey<Item> GLOWCANE_SHOOT = create("glowcane_shoot");

public static final TagKey<Item> STORAGE_BLOCKS_ALLIUM = create("storage_blocks/allium");
public static final TagKey<Item> STORAGE_BLOCKS_PINK_ALLIUM = create("storage_blocks/pink_allium");
public static final TagKey<Item> STORAGE_BLOCKS_WHITE_ALLIUM = create("storage_blocks/white_allium");
public static final TagKey<Item> STORAGE_BLOCKS_ROSE = create("storage_blocks/rose");
public static final TagKey<Item> STORAGE_BLOCKS_ALLIUM = createCommon("storage_blocks/allium");
public static final TagKey<Item> STORAGE_BLOCKS_PINK_ALLIUM = createCommon("storage_blocks/pink_allium");
public static final TagKey<Item> STORAGE_BLOCKS_WHITE_ALLIUM = createCommon("storage_blocks/white_allium");
public static final TagKey<Item> STORAGE_BLOCKS_ROSE = createCommon("storage_blocks/rose");

public static final TagKey<Item> MAKES_BLACK_DYE = create("dye/makes_black_dye");
public static final TagKey<Item> MAKES_BLUE_DYE = create("dye/makes_blue_dye");
Expand All @@ -55,4 +56,8 @@ public class BWGItemTags {
private static TagKey<Item> create(String name) {
return TagKey.create(Registries.ITEM, BiomesWeveGone.id(name));
}

private static TagKey<Item> createCommon(String name) {
return TagKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath("c", name));
}
}

0 comments on commit 7f4dbb7

Please sign in to comment.