Skip to content

Commit

Permalink
Add Tags
Browse files Browse the repository at this point in the history
  • Loading branch information
BastosOff committed Nov 18, 2024
1 parent ec0ceba commit ecbdd07
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/main/java/fr/celyanrbx/coreforge/util/ModTags.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package fr.celyanrbx.coreforge.util;

import fr.celyanrbx.coreforge.Coreforge;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

public class ModTags {
public static class Blocks {

private static TagKey<Block> createTag(String name) {
return BlockTags.create(ResourceLocation.fromNamespaceAndPath(Coreforge.MOD_ID, name));
}
}

public static class Items {
public static final TagKey<Item> TRANSFORMABLE_ITEMS = createTag("transformable_items");

private static TagKey<Item> createTag(String name) {
return ItemTags.create(ResourceLocation.fromNamespaceAndPath(Coreforge.MOD_ID, name));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
"coreforge:steel",
"minecraft:coal",
"minecraft:stick",
"minecraft:compass"
]
}

0 comments on commit ecbdd07

Please sign in to comment.