Skip to content

Commit

Permalink
Add custom material tags to common NeoForge tags (Fixes #140)
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Aug 25, 2024
1 parent ef7549a commit e31e46b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/data/java/gripe/_90/megacells/datagen/MEGATagProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.common.data.ExistingFileHelper;

import appeng.api.features.P2PTunnelAttunement;
Expand Down Expand Up @@ -46,6 +47,11 @@ protected void addTags(@NotNull HolderLookup.Provider provider) {
tag(MEGATags.SKY_STEEL_BLOCK).add(MEGABlocks.SKY_STEEL_BLOCK.block());
tag(MEGATags.SKY_BRONZE_BLOCK).add(MEGABlocks.SKY_BRONZE_BLOCK.block());
tag(MEGATags.SKY_OSMIUM_BLOCK).add(MEGABlocks.SKY_OSMIUM_BLOCK.block());

tag(Tags.Blocks.STORAGE_BLOCKS)
.addTag(MEGATags.SKY_STEEL_BLOCK)
.addTag(MEGATags.SKY_BRONZE_BLOCK)
.addTag(MEGATags.SKY_OSMIUM_BLOCK);
}

@NotNull
Expand Down Expand Up @@ -91,6 +97,12 @@ protected void addTags(@NotNull HolderLookup.Provider provider) {
.add(Items.ICE, Items.PACKED_ICE)
.addOptionalTag(
ResourceLocation.fromNamespaceAndPath("functionalstorage", "ignore_crafting_check"));

tag(Tags.Items.INGOTS)
.addTag(MEGATags.SKY_STEEL_INGOT)
.addTag(MEGATags.SKY_BRONZE_INGOT)
.addTag(MEGATags.SKY_OSMIUM_INGOT);
copy(Tags.Blocks.STORAGE_BLOCKS, Tags.Items.STORAGE_BLOCKS);
}

@NotNull
Expand Down
7 changes: 7 additions & 0 deletions src/generated/resources/data/c/tags/block/storage_blocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"values": [
"#c:storage_blocks/sky_steel",
"#c:storage_blocks/sky_bronze",
"#c:storage_blocks/sky_osmium"
]
}
7 changes: 7 additions & 0 deletions src/generated/resources/data/c/tags/item/ingots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"values": [
"#c:ingots/sky_steel",
"#c:ingots/sky_bronze",
"#c:ingots/sky_osmium"
]
}
7 changes: 7 additions & 0 deletions src/generated/resources/data/c/tags/item/storage_blocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"values": [
"#c:storage_blocks/sky_steel",
"#c:storage_blocks/sky_bronze",
"#c:storage_blocks/sky_osmium"
]
}

0 comments on commit e31e46b

Please sign in to comment.