Skip to content

Commit

Permalink
feat: add berry cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkaf committed Mar 20, 2024
1 parent 2f0e099 commit f866e52
Show file tree
Hide file tree
Showing 25 changed files with 264 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// 1.20.1 2024-03-20T14:30:52.2602758 Kaf's Valentine Special/Recipes
// 1.20.1 2024-03-20T20:24:26.3789991 Kaf's Valentine Special/Recipes
8839a7102aead55bc35c0586436302bdc0ab6a5c data\kafvalentine\recipes\special_fire_cookie_from_infusing_fire_cookie.json
fbe69f5f9005fc83b59264687183c72394e9e9b2 data\kafvalentine\advancements\recipes\food\berry_cookie.json
4da9f258446eb8f43829e51a9f7ecefba393c497 data\kafvalentine\recipes\golden_cookie.json
093fb48462bf22fed0addbfe4ac7b2e6332fe19a data\kafvalentine\advancements\recipes\food\special_chocolate_cookie.json
4d446ebd6bfcc96d9e866c0e7a06f2645a1e2655 data\kafvalentine\recipes\special_berry_cookie_from_infusing_berry_cookie.json
de317d520364b401681494dfa7548510c7402077 data\kafvalentine\recipes\lovey_dovey_infuser.json
301d0358add36606ba01ef3816e42b938b53eeed data\kafvalentine\recipes\aristea_cookie.json
7552572c524f4a8d5da3729f09c0e86c9028b7a2 data\kafvalentine\recipes\chorus_cookie.json
Expand All @@ -26,6 +28,7 @@ ec52da32adb36a1715b69d3016b9c25ac47e4d94 data\kafvalentine\recipes\special_choco
bc076317a1c015c0f8a04b0251c4489ea3e7438f data\kafvalentine\advancements\recipes\food\fire_cookie.json
7feff775a1c53947da083d3dfad42c1f4385ad34 data\kafvalentine\advancements\recipes\food\spooky_cookie.json
8868034e398c9e15cb53d9f2c689416b287eee21 data\kafvalentine\recipes\special_aristea_cookie_from_infusing_aristea_cookie.json
b2bc547b463876467b7888842f0b913e82ff01f8 data\kafvalentine\recipes\berry_cookie.json
1dd27bad756385cee32b94461391cda981510091 data\kafvalentine\recipes\special_caramel_cookie_from_infusing_caramel_cookie.json
0cc43a4a71086e68cf48d9374c5a91feab61fd6a data\kafvalentine\advancements\recipes\food\aristea_cookie.json
d32b125cff92955755e57b79ee7886d42148f27d data\kafvalentine\advancements\recipes\food\evil_cookie.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 1.20.1 2024-03-20T14:30:52.2612802 Kaf's Valentine Special/Tags for minecraft:block
// 1.20.1 2024-03-20T20:24:26.3800019 Kaf's Valentine Special/Tags for minecraft:block
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\minecraft\tags\blocks\flowers.json
8f07b04159f7352d1b38cb3fe7f1a64493c8ce5d data\minecraft\tags\blocks\bee_growables.json
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\c\tags\blocks\flowers.json
a1798706c3e5fd45736c9c5576100f04b2d857ff data\minecraft\tags\blocks\mineable\pickaxe.json
a1798706c3e5fd45736c9c5576100f04b2d857ff data\minecraft\tags\blocks\needs_stone_tool.json
a1798706c3e5fd45736c9c5576100f04b2d857ff data\minecraft\tags\blocks\mineable\pickaxe.json
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\minecraft\tags\blocks\small_flowers.json
25cc646d5e2a2f791d1e2f4e5535188a658cf758 data\c\tags\blocks\plant.json
25cc646d5e2a2f791d1e2f4e5535188a658cf758 data\minecraft\tags\blocks\crops.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-03-20T14:30:52.2597753 Kaf's Valentine Special/Block Loot Tables
// 1.20.1 2024-03-20T20:24:26.3784996 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,5 +1,6 @@
// 1.20.1 2024-03-20T14:30:52.2567618 Kaf's Valentine Special/Model Definitions
// 1.20.1 2024-03-20T20:24:26.3759945 Kaf's Valentine Special/Model Definitions
ce36fcf7318243a60feebd83eeeb0cac6eb4427e assets\kafvalentine\models\item\aristea_cookie.json
72438df75da150a8d34680bfde58ba0246502a06 assets\kafvalentine\models\item\special_berry_cookie.json
94fb8c93e565e2b657e2642783928b7d4368bac8 assets\kafvalentine\models\item\special_evil_cookie.json
f230362b425023b92f497863011b67a43a19d936 assets\kafvalentine\blockstates\lovey_dovey_infuser.json
988a193d6a639cfc12e2b08d43d03fea2227cb32 assets\kafvalentine\models\item\rocket_cookie.json
Expand All @@ -20,10 +21,11 @@ d18fb7f86d8921a99665ad9decdca2df5f14f936 assets\kafvalentine\models\item\special
fe09da65d1595bf961d0bf1d99732aaca1321245 assets\kafvalentine\models\item\caramel_cookie.json
4df5d4fa3d3580200ba06079526eb376878df068 assets\kafvalentine\models\item\cotton_candy.json
d0576d55112119fefa385cab24b0814bc068189f assets\kafvalentine\models\item\special_explosive_cookie.json
f7eb0125a870954a0c6c0d8bb081dba8eedfb5cb assets\kafvalentine\models\block\cotton_candy_crop_stage0.json
0de04ff727d417a5bf18a1d9d85ee7e98ceed3d3 assets\kafvalentine\models\block\cotton_candy_crop_stage3.json
f7eb0125a870954a0c6c0d8bb081dba8eedfb5cb assets\kafvalentine\models\block\cotton_candy_crop_stage0.json
69c9c9e7104863d68460a35f308eca404e059733 assets\kafvalentine\models\item\special_apple_cookie.json
1c2305fb2d6e26b2bf9da1430da0fb889bd94ae1 assets\kafvalentine\models\item\special_glow_cookie.json
8c3bbe4a79108036a235d09e9ab53a05a055d2c4 assets\kafvalentine\models\item\berry_cookie.json
39314bf15cfb35e399b54a32c3ea31206ee25d2b assets\kafvalentine\models\item\medic_cookie.json
f5d20385fdc3fc956ca0b6ade4e4eda997fb34ba assets\kafvalentine\models\item\good_vision_cookie.json
86a39e2ca577fc58a94d762e4e15c3c42ad970e2 assets\kafvalentine\models\block\aristea.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// 1.20.1 2024-03-20T14:30:52.2617809 Kaf's Valentine Special/Tags for minecraft:item
// 1.20.1 2024-03-20T20:24:26.3805017 Kaf's Valentine Special/Tags for minecraft:item
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\c\tags\items\flowers.json
ce6a482785a6e59c4123a2340480b82a07830731 data\c\tags\items\cookies.json
33856e694dfbe2a0b071a848f779d2b7cd215eba data\c\tags\items\cookies.json
9821ba29b28cd7ed1bbbb41aaf307e3c57b56e99 data\c\tags\items\golden_apples.json
2388a7d48daef4a569c89aab474c716a355c724d data\c\tags\items\seeds.json
2388a7d48daef4a569c89aab474c716a355c724d data\minecraft\tags\items\villager_plantable_seeds.json
9c8348c58e3e27b69a4b16f8e20d8eaa980834bc data\c\tags\items\aristeas.json
2388a7d48daef4a569c89aab474c716a355c724d data\botania\tags\items\seed_apothecary_reagent.json
ce6a482785a6e59c4123a2340480b82a07830731 data\origins\tags\items\ignore_diet.json
33856e694dfbe2a0b071a848f779d2b7cd215eba data\origins\tags\items\ignore_diet.json
2388a7d48daef4a569c89aab474c716a355c724d data\naturalist\tags\items\bird_food_items.json
ce6a482785a6e59c4123a2340480b82a07830731 data\kafvalentine\tags\items\kaf_cookie.json
33856e694dfbe2a0b071a848f779d2b7cd215eba data\kafvalentine\tags\items\kaf_cookie.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 1.20.1 2024-03-20T14:30:52.2592759 Kaf's Valentine Special/World Gen
// 1.20.1 2024-03-20T20:24:26.3780005 Kaf's Valentine Special/World Gen
312eff65da6bcfab1829dcdc1e868b55ac396187 data\kafvalentine\worldgen\configured_feature\aristea.json
30a27f2e3d0058747f9ebd18abe2b3e32b5a8d98 data\kafvalentine\worldgen\placed_feature\aristea_placed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "kafvalentine:item/berry_cookie"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "kafvalentine:item/special_berry_cookie"
}
}
4 changes: 4 additions & 0 deletions src/main/generated/data/c/tags/items/cookies.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"kafvalentine:prismatic_cookie",
"kafvalentine:special_prismatic_cookie",
"kafvalentine:chorus_cookie",
"kafvalentine:special_chorus_cookie",
"kafvalentine:berry_cookie",
"kafvalentine:special_berry_cookie",
"kafvalentine:chorus_cookie",
"kafvalentine:special_chorus_cookie"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_cookie": {
"conditions": {
"items": [
{
"items": [
"minecraft:cookie"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_cotton_candy": {
"conditions": {
"items": [
{
"items": [
"kafvalentine:cotton_candy"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_sweet_berries": {
"conditions": {
"items": [
{
"items": [
"minecraft:sweet_berries"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "minecraft:berry_cookie"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_sweet_berries",
"has_cookie",
"has_cotton_candy",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"minecraft:berry_cookie"
]
},
"sends_telemetry_event": false
}
25 changes: 25 additions & 0 deletions src/main/generated/data/kafvalentine/recipes/berry_cookie.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"A": {
"item": "minecraft:sweet_berries"
},
"B": {
"item": "kafvalentine:cotton_candy"
},
"C": {
"item": "minecraft:cookie"
}
},
"pattern": [
"ABA",
"BCB",
"ABA"
],
"result": {
"count": 2,
"item": "kafvalentine:berry_cookie"
},
"show_notification": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "kafvalentine:lovey_dovey_infusing",
"ingredients": [
{
"item": "kafvalentine:berry_cookie"
}
],
"output": {
"item": "kafvalentine:special_berry_cookie"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"kafvalentine:prismatic_cookie",
"kafvalentine:special_prismatic_cookie",
"kafvalentine:chorus_cookie",
"kafvalentine:special_chorus_cookie",
"kafvalentine:berry_cookie",
"kafvalentine:special_berry_cookie",
"kafvalentine:chorus_cookie",
"kafvalentine:special_chorus_cookie"
]
}
4 changes: 4 additions & 0 deletions src/main/generated/data/origins/tags/items/ignore_diet.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
"kafvalentine:prismatic_cookie",
"kafvalentine:special_prismatic_cookie",
"kafvalentine:chorus_cookie",
"kafvalentine:special_chorus_cookie",
"kafvalentine:berry_cookie",
"kafvalentine:special_berry_cookie",
"kafvalentine:chorus_cookie",
"kafvalentine:special_chorus_cookie"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ protected void configure(RegistryWrapper.WrapperLookup arg) {
ModItems.PRISMATIC_COOKIE,
ModItems.SPECIAL_PRISMATIC_COOKIE,
ModItems.CHORUS_COOKIE,
ModItems.SPECIAL_CHORUS_COOKIE,
ModItems.BERRY_COOKIE,
ModItems.SPECIAL_BERRY_COOKIE,
ModItems.CHORUS_COOKIE,
ModItems.SPECIAL_CHORUS_COOKIE
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public void generateItemModels(ItemModelGenerator itemModelGenerator) {
itemModelGenerator.register(ModItems.SPECIAL_PRISMATIC_COOKIE, Models.GENERATED);
itemModelGenerator.register(ModItems.CHORUS_COOKIE, Models.GENERATED);
itemModelGenerator.register(ModItems.SPECIAL_CHORUS_COOKIE, Models.GENERATED);
itemModelGenerator.register(ModItems.BERRY_COOKIE, Models.GENERATED);
itemModelGenerator.register(ModItems.SPECIAL_BERRY_COOKIE, Models.GENERATED);

itemModelGenerator.register(ModItems.COOKIE_BOOK, Models.GENERATED);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ public void generate(Consumer<RecipeJsonProvider> exporter) {
.input('A', Items.FIREWORK_ROCKET)
.input('B', ModItems.COTTON_CANDY)
.input('C', Items.COOKIE)
.criterion(
hasItem(Items.FIREWORK_ROCKET),
.criterion(hasItem(Items.FIREWORK_ROCKET),
conditionsFromItem(Items.FIREWORK_ROCKET)
)
.criterion(hasItem(Items.COOKIE), conditionsFromItem(Items.COOKIE))
Expand Down Expand Up @@ -286,9 +285,7 @@ public void generate(Consumer<RecipeJsonProvider> exporter) {
.input('A', Items.PRISMARINE)
.input('B', ModItems.COTTON_CANDY)
.input('C', Items.COOKIE)
.criterion(hasItem(Items.PRISMARINE),
conditionsFromItem(Items.PRISMARINE)
)
.criterion(hasItem(Items.PRISMARINE), conditionsFromItem(Items.PRISMARINE))
.criterion(hasItem(Items.COOKIE), conditionsFromItem(Items.COOKIE))
.criterion(hasItem(ModItems.COTTON_CANDY),
conditionsFromItem(ModItems.COTTON_CANDY)
Expand All @@ -302,14 +299,26 @@ public void generate(Consumer<RecipeJsonProvider> exporter) {
.input('A', Items.CHORUS_FRUIT)
.input('B', ModItems.COTTON_CANDY)
.input('C', Items.COOKIE)
.criterion(hasItem(Items.CHORUS_FRUIT),
conditionsFromItem(Items.CHORUS_FRUIT)
)
.criterion(hasItem(Items.CHORUS_FRUIT), conditionsFromItem(Items.CHORUS_FRUIT))
.criterion(hasItem(Items.COOKIE), conditionsFromItem(Items.COOKIE))
.criterion(hasItem(ModItems.COTTON_CANDY),
conditionsFromItem(ModItems.COTTON_CANDY)
)
.offerTo(exporter, new Identifier(getRecipeName(ModItems.CHORUS_COOKIE)));
ShapedRecipeJsonBuilder
.create(RecipeCategory.FOOD, ModItems.BERRY_COOKIE, 2)
.pattern("ABA")
.pattern("BCB")
.pattern("ABA")
.input('A', Items.SWEET_BERRIES)
.input('B', ModItems.COTTON_CANDY)
.input('C', Items.COOKIE)
.criterion(hasItem(Items.SWEET_BERRIES), conditionsFromItem(Items.SWEET_BERRIES))
.criterion(hasItem(Items.COOKIE), conditionsFromItem(Items.COOKIE))
.criterion(hasItem(ModItems.COTTON_CANDY),
conditionsFromItem(ModItems.COTTON_CANDY)
)
.offerTo(exporter, new Identifier(getRecipeName(ModItems.BERRY_COOKIE)));

LoveyDoveyInfusingRecipeJsonBuilder
.create()
Expand Down Expand Up @@ -401,5 +410,10 @@ public void generate(Consumer<RecipeJsonProvider> exporter) {
.input(ModItems.CHORUS_COOKIE)
.output(ModItems.SPECIAL_CHORUS_COOKIE)
.offerTo(exporter);
LoveyDoveyInfusingRecipeJsonBuilder
.create()
.input(ModItems.BERRY_COOKIE)
.output(ModItems.SPECIAL_BERRY_COOKIE)
.offerTo(exporter);
}
}
2 changes: 2 additions & 0 deletions src/main/java/com/codekaffe/valentine/item/ModItemGroups.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class ModItemGroups {
entries.add(ModItems.SPECIAL_PRISMATIC_COOKIE);
entries.add(ModItems.CHORUS_COOKIE);
entries.add(ModItems.SPECIAL_CHORUS_COOKIE);
entries.add(ModItems.BERRY_COOKIE);
entries.add(ModItems.SPECIAL_BERRY_COOKIE);

entries.add(ModItems.COTTON_CANDY);
entries.add(ModItems.COTTON_CANDY_SEEDS);
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/codekaffe/valentine/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ public class ModItems {
"special_chorus_cookie",
new SpecialChorusCookie(new FabricItemSettings().food(SpecialChorusCookie.FOOD_COMPONENT))
);
public static final Item BERRY_COOKIE = registerItem(
"berry_cookie",
new BerryCookie(new FabricItemSettings().food(BerryCookie.FOOD_COMPONENT))
);
public static final Item SPECIAL_BERRY_COOKIE = registerItem(
"special_berry_cookie",
new SpecialBerryCookie(new FabricItemSettings().food(SpecialBerryCookie.FOOD_COMPONENT))
);

public static final Item COTTON_CANDY = registerItem(
"cotton_candy",
Expand Down
58 changes: 58 additions & 0 deletions src/main/java/com/codekaffe/valentine/item/custom/BerryCookie.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.codekaffe.valentine.item.custom;

import net.minecraft.client.item.TooltipContext;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.passive.BatEntity;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class BerryCookie extends Item {

public static final FoodComponent FOOD_COMPONENT = new FoodComponent.Builder()
.hunger(1)
.saturationModifier(0.1f)
.alwaysEdible()
.statusEffect(new StatusEffectInstance(StatusEffects.JUMP_BOOST, 600), 1f)
.build();

public BerryCookie(Settings settings) {
super(settings);
}

@Override
public void appendTooltip(
ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context
) {
tooltip.add(Text.literal("You're looking berry cute today.").formatted(Formatting.DARK_RED));
}

@Override
public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) {
world.playSound(
user.getX(),
user.getY(),
user.getZ(),
SoundEvents.ENTITY_FOX_AMBIENT,
SoundCategory.PLAYERS,
1f,
1f,
false
);

return super.finishUsing(stack, world, user);
}
}
Loading

0 comments on commit f866e52

Please sign in to comment.