Skip to content

Commit

Permalink
feat: add a couple item tags to aristea
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkaf committed Feb 28, 2024
1 parent 2d64f14 commit 180ffd1
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.8
loader_version=0.14.21

# Mod Properties
mod_version=1.2.1-1.20.1
mod_version=1.2.2+1.20.1
maven_group=com.codekaffe.valentine
archives_base_name=kafvalentine-fabric

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-02-23T18:36:39.1895233 Kaf's Valentine Special/Recipes
// 1.20.1 2024-02-28T10:01:20.3202891 Kaf's Valentine Special/Recipes
dc56546942d667e5b8b197f13136e85f87d0c28f data\kafvalentine\advancements\recipes\misc\lovey_dovey_infuser.json
de317d520364b401681494dfa7548510c7402077 data\kafvalentine\recipes\lovey_dovey_infuser.json
9d07d698dccc09aa9a256b97b47234fa1170dc61 data\kafvalentine\recipes\special_chocolate_cookie.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 1.20.1 2024-02-23T18:36:39.1900226 Kaf's Valentine Special/Tags for minecraft:block
a1798706c3e5fd45736c9c5576100f04b2d857ff data\minecraft\tags\blocks\needs_stone_tool.json
// 1.20.1 2024-02-28T10:01:20.3207882 Kaf's Valentine Special/Tags for minecraft:block
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\c\tags\blocks\flowers.json
a1798706c3e5fd45736c9c5576100f04b2d857ff data\minecraft\tags\blocks\mineable\pickaxe.json
a1798706c3e5fd45736c9c5576100f04b2d857ff data\minecraft\tags\blocks\needs_stone_tool.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-02-23T18:36:39.1890235 Kaf's Valentine Special/Block Loot Tables
// 1.20.1 2024-02-28T10:01:20.3197893 Kaf's Valentine Special/Block Loot Tables
c398222fb15587d243e94a83eda77222d434bcfe data\kafvalentine\loot_tables\blocks\cotton_candy_crop.json
1be6bea11684ce2e5253abed1df40340cac97293 data\kafvalentine\loot_tables\blocks\aristea.json
df7afe04fb92f9685a24bc3d7893986bb782e56d data\kafvalentine\loot_tables\blocks\lovey_dovey_infuser.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-02-23T18:36:39.1870125 Kaf's Valentine Special/Model Definitions
// 1.20.1 2024-02-28T10:01:20.3177848 Kaf's Valentine Special/Model Definitions
f1b9765d7a5df224428d8a4908696343dc153a2a assets\kafvalentine\models\block\potted_aristea.json
9e8d717f49da5b3802411bad8724b3b24ec97ea3 assets\kafvalentine\models\item\aristea.json
a334fbe52f56e2f07530686a01db6d7152e5aaa3 assets\kafvalentine\models\item\cotton_candy_seeds.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// 1.20.1 2024-02-23T18:36:39.1900226 Kaf's Valentine Special/Tags for minecraft:item
// 1.20.1 2024-02-28T10:01:20.3212859 Kaf's Valentine Special/Tags for minecraft:item
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\c\tags\items\flowers.json
f67de4dd68af4b468ac5b5823802ead6c689cfaa data\kafvalentine\tags\items\special_cookie.json
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\c\tags\items\aristeas.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 1.20.1 2024-02-23T18:36:39.1885176 Kaf's Valentine Special/World Gen
// 1.20.1 2024-02-28T10:01:20.3192862 Kaf's Valentine Special/World Gen
312eff65da6bcfab1829dcdc1e868b55ac396187 data\kafvalentine\worldgen\configured_feature\aristea.json
30a27f2e3d0058747f9ebd18abe2b3e32b5a8d98 data\kafvalentine\worldgen\placed_feature\aristea_placed.json
6 changes: 6 additions & 0 deletions src/main/generated/data/c/tags/blocks/flowers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"kafvalentine:aristea"
]
}
6 changes: 6 additions & 0 deletions src/main/generated/data/c/tags/items/aristeas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"kafvalentine:aristea"
]
}
6 changes: 6 additions & 0 deletions src/main/generated/data/c/tags/items/flowers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"kafvalentine:aristea"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.codekaffe.valentine.datagen;

import com.codekaffe.valentine.block.ModBlocks;
import com.codekaffe.valentine.util.ModTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.registry.RegistryWrapper;
Expand All @@ -17,6 +18,6 @@ public ModBlockTagProvider(FabricDataOutput output, CompletableFuture<RegistryWr
protected void configure(RegistryWrapper.WrapperLookup arg) {
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE).add(ModBlocks.LOVEY_DOVEY_INFUSER);
getOrCreateTagBuilder(BlockTags.NEEDS_STONE_TOOL).add(ModBlocks.LOVEY_DOVEY_INFUSER);

getOrCreateTagBuilder(ModTags.Blocks.FLOWERS).add(ModBlocks.ARISTEA);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.codekaffe.valentine.datagen;

import com.codekaffe.valentine.block.ModBlocks;
import com.codekaffe.valentine.item.ModItems;
import com.codekaffe.valentine.util.ModTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
Expand All @@ -18,5 +19,8 @@ protected void configure(RegistryWrapper.WrapperLookup arg) {
getOrCreateTagBuilder(ModTags.Items.SPECIAL_COOKIE)
.add(ModItems.SPECIAL_CHOCOLATE_COOKIE)
.add(ModItems.EXTRA_SPECIAL_CHOCOLATE_COOKIE);

getOrCreateTagBuilder(ModTags.Items.ARISTEA).add(ModBlocks.ARISTEA.asItem());
getOrCreateTagBuilder(ModTags.Items.FLOWERS).add(ModBlocks.ARISTEA.asItem());
}
}
11 changes: 11 additions & 0 deletions src/main/java/com/codekaffe/valentine/util/ModTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,28 @@

public class ModTags {
public static class Blocks {
public static final TagKey<Block> FLOWERS = createCommonTag("flowers");

private static TagKey<Block> createTag(String name) {
return TagKey.of(RegistryKeys.BLOCK, new Identifier(KafValentine.MOD_ID, name));
}

private static TagKey<Block> createCommonTag(String name) {
return TagKey.of(RegistryKeys.BLOCK, new Identifier("c", name));
}
}

public static class Items {
public static final TagKey<Item> SPECIAL_COOKIE = createTag("special_cookie");
public static final TagKey<Item> ARISTEA = createCommonTag("aristeas");
public static final TagKey<Item> FLOWERS = createCommonTag("flowers");

private static TagKey<Item> createTag(String name) {
return TagKey.of(RegistryKeys.ITEM, new Identifier(KafValentine.MOD_ID, name));
}

private static TagKey<Item> createCommonTag(String name) {
return TagKey.of(RegistryKeys.ITEM, new Identifier("c", name));
}
}
}

0 comments on commit 180ffd1

Please sign in to comment.