mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Add c:bars/copper and c:bars/iron tags (#10810)
This commit is contained in:
1 parent
03f928a3de
commit
478d8b3f18
9 files changed
+67
-1
No files matched your search
@@ -62,6 +62,12 @@ public class Tags {
|
||||
// Forge only adopts `c` tags that are common across all loaders.
|
||||
public static final TagKey<Block> BARRELS = cTag("barrels");
|
||||
public static final TagKey<Block> BARRELS_WOODEN = cTag("barrels/wooden");
|
||||
/**
|
||||
* Equivalent to the "minecraft:bars" block tag.
|
||||
*/
|
||||
public static final TagKey<Block> BARS = cTag("bars");
|
||||
public static final TagKey<Block> BARS_COPPER = cTag("bars/copper");
|
||||
public static final TagKey<Block> BARS_IRON = cTag("bars/iron");
|
||||
public static final TagKey<Block> BOOKSHELVES = cTag("bookshelves");
|
||||
/**
|
||||
* For blocks that are similar to amethyst where their budding block produces buds and cluster blocks
|
||||
@@ -349,6 +355,12 @@ public class Tags {
|
||||
// Forge only adopts `c` tags that are common across all loaders.
|
||||
public static final TagKey<Item> BARRELS = cTag("barrels");
|
||||
public static final TagKey<Item> BARRELS_WOODEN = cTag("barrels/wooden");
|
||||
/**
|
||||
* Equivalent to the "minecraft:bars" item tag.
|
||||
*/
|
||||
public static final TagKey<Item> BARS = cTag("bars");
|
||||
public static final TagKey<Item> BARS_COPPER = cTag("bars/copper");
|
||||
public static final TagKey<Item> BARS_IRON = cTag("bars/iron");
|
||||
public static final TagKey<Item> BONES = cTag("bones");
|
||||
public static final TagKey<Item> BOOKSHELVES = cTag("bookshelves");
|
||||
public static final TagKey<Item> BRICKS = cTag("bricks");
|
||||
|
||||
@@ -28,6 +28,12 @@ public abstract class ForgeBlockItemTagsProvider extends BlockItemTagsProvider {
|
||||
.addTag(Tags.Blocks.BARRELS_WOODEN);
|
||||
tag(Tags.Blocks.BARRELS_WOODEN, Tags.Items.BARRELS_WOODEN)
|
||||
.add(Blocks.BARREL);
|
||||
tag(Tags.Blocks.BARS_COPPER, Tags.Items.BARS_COPPER)
|
||||
.addAll(Blocks.COPPER_BARS.asList());
|
||||
tag(Tags.Blocks.BARS_IRON, Tags.Items.BARS_IRON)
|
||||
.add(Blocks.IRON_BARS);
|
||||
tag(Tags.Blocks.BARS, Tags.Items.BARS)
|
||||
.addTags(Tags.Blocks.BARS_COPPER, Tags.Blocks.BARS_IRON, BlockTags.BARS);
|
||||
tag(Tags.Blocks.BOOKSHELVES, Tags.Items.BOOKSHELVES)
|
||||
.add(Blocks.BOOKSHELF);
|
||||
tag(Tags.Blocks.BUDDING_BLOCKS, Tags.Items.BUDDING_BLOCKS)
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class ForgeBlockTagsProvider extends VanillaBlockTagsProvider {
|
||||
private void addColored(TagKey<Block> group, String pattern) {
|
||||
String prefix = group.location().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
for (var color : DyeColor.values()) {
|
||||
var key = Identifier.fromNamespaceAndPath("minecraft", pattern.replace("{color}", color.getName()));
|
||||
var key = Identifier.withDefaultNamespace(pattern.replace("{color}", color.getName()));
|
||||
TagKey<Block> tag = getTag(prefix + color.getName());
|
||||
var block = ForgeRegistries.BLOCKS.getValue(key);
|
||||
if (block == null || block == Blocks.AIR)
|
||||
|
||||
Reference in new issue
Block a user