Skip to content

Commit

Permalink
Add latte coffee bottles
Browse files Browse the repository at this point in the history
Latte coffee bottles are made by combining milk and black coffee at a campfire with cauldron
Drinking a latte coffee bottle reduces all active effects' levels by 1 (excluding Caffeine)
Update coffee bottle texture and effect
  • Loading branch information
Chikorita-Lover committed Jan 1, 2024
1 parent 530d70d commit 874b648
Show file tree
Hide file tree
Showing 26 changed files with 177 additions and 62 deletions.
24 changes: 13 additions & 11 deletions src/main/generated/.cache/c189bb4c92920ea572e0709157481155fe15e5dc
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
// 1.20.1 2023-12-30T12:13:30.3473862 Caffeinated/Recipes
// 1.20.1 2024-01-01T00:51:21.9079247 Caffeinated/Recipes
a6e938fc8f033d82fb2c73674b2d38dbf58ef14d data\caffeinated\advancements\recipes\misc\coffee_beans_from_campfire_cooking.json
2b1061f72b3e9a1295c9aa4334d37c9dcb3dfc53 data\caffeinated\advancements\recipes\misc\java_banner_pattern.json
134904d483435f3e31bdf94eaf62387c8b3c0caa data\caffeinated\advancements\recipes\misc\java_banner_pattern.json
51838f015a3a334f4cc29bd8c59bc56464b2552d data\caffeinated\recipes\ground_coffee_block.json
1922870ee697bc6be35c4d62cbf7abcb35d46cf1 data\caffeinated\advancements\recipes\food\coffee_bottle.json
06c7edbdec5cf1deb92d8e421279587f14aaab54 data\caffeinated\advancements\recipes\food\tiramisu.json
5dfbeda6e15d9e292a25fc4e3f33d71b2ab777cb data\caffeinated\recipes\coffee_beans_from_smoking.json
f8bbfcc2f655643293992d2bc113858fedbcc78f data\caffeinated\recipes\tiramisu.json
cd15441554dc9c3417486d7787d4609ccb9888b8 data\caffeinated\recipes\ground_coffee.json
85ccf4fe4d91361b2eab60b79f83fa9c7f3f712f data\caffeinated\advancements\recipes\misc\coffee_beans_from_smoking.json
cd15441554dc9c3417486d7787d4609ccb9888b8 data\caffeinated\recipes\ground_coffee.json
d746ed80e2bf6726432f6ed1dd39e6851579ed47 data\caffeinated\recipes\coffee_bean_block.json
5721d4f7e3a65f7b6f387ec00ee996f73a2f51ee data\caffeinated\advancements\recipes\misc\coffee_beans.json
b78f30260a00fcc80fd6b65b41be9adce06286c9 data\caffeinated\recipes\coffee_beans.json
24a0c9134797ce54d520f0577280c3d3d6b2cb4b data\caffeinated\recipes\latte_coffee_bottle.json
c1dd44b442244812fd79333ec001551523590d59 data\caffeinated\advancements\recipes\misc\ground_coffee.json
7ac9428c1c4810e6e439997467b8c5afad1711b9 data\caffeinated\advancements\recipes\food\coffee_berries.json
9d897a3e9077ae5bb5936e2e7bb95380fb7b16ec data\caffeinated\advancements\recipes\food\tiramisu.json
a7404a62120517ad3f0fa400b2910c1d352cefa1 data\caffeinated\recipes\tiramisu.json
ca718ec02747f39187e77abb367019198eac644e data\caffeinated\recipes\brown_dye_from_ground_coffee.json
d34b1b5cba65cbe93df946e3a6badee9edc69dc0 data\caffeinated\recipes\coffee_berries.json
7d3019bc5b37ce3328bf16cc9b8edb2eb0839802 data\caffeinated\advancements\recipes\food\tiramisu_from_slices.json
d746ed80e2bf6726432f6ed1dd39e6851579ed47 data\caffeinated\recipes\coffee_bean_block.json
3f815caa0d14d9f4dd898dfd686a518ba07b5408 data\caffeinated\advancements\recipes\misc\brown_dye_from_ground_coffee.json
e39e052812503e16d973da3fd45097dfeed197df data\caffeinated\advancements\recipes\food\latte_coffee_bottle.json
f86c55d2f85321c89c00baa260f1964d8b81bdcf data\caffeinated\recipes\tiramisu_from_slices.json
21e45ee047fce833ccdc925196669db7be4d868b data\caffeinated\recipes\coffee_bottle.json
55a0f263de5782dd9ec9aecd1d1ae815e3760bdb data\caffeinated\advancements\recipes\building_blocks\ground_coffee_block.json
5721d4f7e3a65f7b6f387ec00ee996f73a2f51ee data\caffeinated\advancements\recipes\misc\coffee_beans.json
9dd043aa58724c5f9d877d84071191951a251c2b data\caffeinated\recipes\coffee_beans_from_campfire_cooking.json
d466ced2e8e679a807bdbcee307e0eb5e6547942 data\caffeinated\recipes\java_banner_pattern.json
7b0d6983e6db1d249d6d568138ab0e3d3c0f1495 data\caffeinated\recipes\java_banner_pattern.json
bb529f25b75b190a9da8518d7a0931d22cbaf194 data\caffeinated\advancements\recipes\building_blocks\coffee_bean_block.json
b78f30260a00fcc80fd6b65b41be9adce06286c9 data\caffeinated\recipes\coffee_beans.json
c1dd44b442244812fd79333ec001551523590d59 data\caffeinated\advancements\recipes\misc\ground_coffee.json
7ac9428c1c4810e6e439997467b8c5afad1711b9 data\caffeinated\advancements\recipes\food\coffee_berries.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// 1.20.1 2023-12-30T12:13:30.3443018 Caffeinated/Model Definitions
// 1.20.1 2024-01-01T00:51:21.9037056 Caffeinated/Model Definitions
da4528a3cfafc1ab21e5814b64029c10ec357178 assets\caffeinated\blockstates\ground_coffee_block.json
26f35f3a03b0d53578efd2c555721b08353d75f0 assets\caffeinated\blockstates\coffee_cauldron.json
b1a481861132973fe035c9b9ce7613e15938034c assets\caffeinated\models\block\coffee_berry_crate.json
e8f1792493d7219e1da4ac39e45bf903a349e3f5 assets\caffeinated\models\block\ground_coffee_cauldron_full.json
cd360bb185f465f81672c32ac31312f77270e5f4 assets\caffeinated\models\block\coffee_cauldron_level2.json
5f0ad0fc380a095ead21e3a00bdbbdcd648548e3 assets\caffeinated\models\item\latte_coffee_bottle.json
57311e73aae426dff5d3b58c69ec071360f952d3 assets\caffeinated\models\block\ground_coffee_cauldron_level1.json
13297d4a51cb3b1369630338ba5f7b439b4af3fc assets\caffeinated\models\block\cauldron_campfire_filled.json
cd254ba40cfd07d6c01d66a963e5ec83ed478aef assets\caffeinated\blockstates\coffee_berry_crate.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "caffeinated:item/latte_coffee_bottle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_milk_bucket": {
"conditions": {
"items": [
{
"tag": "c:milk_buckets"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "caffeinated:latte_coffee_bottle"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_milk_bucket",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"caffeinated:latte_coffee_bottle"
]
},
"sends_telemetry_event": false
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_coffee_bottle": {
"has_black_coffee_bottle": {
"conditions": {
"items": [
{
"items": [
"caffeinated:coffee_bottle"
]
"tag": "caffeinated:black_coffee_bottles"
}
]
},
Expand All @@ -22,7 +20,7 @@
},
"requirements": [
[
"has_coffee_bottle",
"has_black_coffee_bottle",
"has_the_recipe"
]
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"conditions": {
"items": [
{
"items": [
"caffeinated:coffee_bottle"
]
"tag": "caffeinated:coffee_bottles"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"item": "minecraft:paper"
},
{
"item": "caffeinated:coffee_bottle"
"tag": "caffeinated:coffee_bottles"
}
],
"result": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "caffeinated:coffee_brewing",
"brewingtime": 600,
"experience": 1.0,
"ingredient": {
"tag": "caffeinated:black_coffee_bottles"
},
"reagent": {
"tag": "c:milk_buckets"
},
"result": "caffeinated:latte_coffee_bottle"
}
4 changes: 2 additions & 2 deletions src/main/generated/data/caffeinated/recipes/tiramisu.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"group": "tiramisu",
"ingredients": [
{
"item": "caffeinated:coffee_bottle"
"tag": "caffeinated:black_coffee_bottles"
},
{
"item": "minecraft:wheat"
Expand All @@ -13,7 +13,7 @@
"item": "minecraft:sugar"
},
{
"item": "minecraft:milk_bucket"
"tag": "c:milk_buckets"
},
{
"item": "minecraft:egg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.chikoritalover.caffeinated.block.TiramisuBlock;
import com.chikoritalover.caffeinated.recipe.CoffeeBrewingRecipeJsonBuilder;
import com.chikoritalover.caffeinated.registry.CaffeinatedBlocks;
import com.chikoritalover.caffeinated.registry.CaffeinatedItemTags;
import com.chikoritalover.caffeinated.registry.CaffeinatedItems;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
Expand All @@ -12,6 +13,7 @@
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags;
import net.minecraft.block.Block;
import net.minecraft.block.LeveledCauldronBlock;
import net.minecraft.data.client.*;
Expand Down Expand Up @@ -96,7 +98,8 @@ public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGen
@Override
public void generateItemModels(ItemModelGenerator itemModelGenerator) {
itemModelGenerator.register(CaffeinatedItems.COFFEE_BEANS, Models.GENERATED);
itemModelGenerator.register(CaffeinatedItems.COFFEE_BOTTLE, Models.GENERATED);
itemModelGenerator.register(CaffeinatedItems.BLACK_COFFEE_BOTTLE, Models.GENERATED);
itemModelGenerator.register(CaffeinatedItems.LATTE_COFFEE_BOTTLE, Models.GENERATED);
itemModelGenerator.register(CaffeinatedItems.GROUND_COFFEE, Models.GENERATED);
itemModelGenerator.register(CaffeinatedItems.JAVA_BANNER_PATTERN, Models.GENERATED);
itemModelGenerator.register(CaffeinatedItems.TIRAMISU_SLICE, Models.GENERATED);
Expand All @@ -118,14 +121,15 @@ public void generate(Consumer<RecipeJsonProvider> exporter) {
CookingRecipeJsonBuilder.createCampfireCooking(Ingredient.ofItems(CaffeinatedItems.COFFEE_BERRIES), RecipeCategory.MISC, CaffeinatedItems.COFFEE_BEANS, 0.3F, 600).criterion(hasItem(CaffeinatedItems.COFFEE_BERRIES), conditionsFromItem(CaffeinatedItems.COFFEE_BERRIES)).offerTo(exporter, new Identifier(Caffeinated.MODID, getItemPath(CaffeinatedItems.COFFEE_BEANS) + "_from_campfire_cooking"));

ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, CaffeinatedItems.GROUND_COFFEE, 3).input('#', CaffeinatedItems.COFFEE_BEANS).pattern("###").criterion(hasItem(CaffeinatedItems.COFFEE_BEANS), conditionsFromItem(CaffeinatedItems.COFFEE_BEANS)).offerTo(exporter);
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, CaffeinatedItems.JAVA_BANNER_PATTERN).input(Items.PAPER).input(CaffeinatedItems.COFFEE_BOTTLE).criterion("has_coffee_bottle", conditionsFromItem(CaffeinatedItems.COFFEE_BOTTLE)).offerTo(exporter);
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, CaffeinatedItems.JAVA_BANNER_PATTERN).input(Items.PAPER).input(CaffeinatedItemTags.COFFEE_BOTTLES).criterion("has_coffee_bottle", conditionsFromTag(CaffeinatedItemTags.COFFEE_BOTTLES)).offerTo(exporter);
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, Items.BROWN_DYE).input(CaffeinatedItems.GROUND_COFFEE).group("brown_dye").criterion("has_ground_coffee", conditionsFromItem(CaffeinatedItems.GROUND_COFFEE)).offerTo(exporter, new Identifier(Caffeinated.MODID, "brown_dye_from_ground_coffee"));

ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, CaffeinatedItems.COFFEE_BERRIES, 9).input(CaffeinatedBlocks.COFFEE_BERRY_CRATE).criterion("has_coffee_berry_crate", conditionsFromItem(CaffeinatedBlocks.COFFEE_BERRY_CRATE)).offerTo(exporter);
ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, CaffeinatedBlocks.TIRAMISU).input(CaffeinatedItems.COFFEE_BOTTLE).input(Items.WHEAT).input(Items.SUGAR).input(Items.MILK_BUCKET).input(Items.EGG).group("tiramisu").criterion("has_coffee_bottle", conditionsFromItem(CaffeinatedItems.COFFEE_BOTTLE)).offerTo(exporter);
ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, CaffeinatedBlocks.TIRAMISU).input(CaffeinatedItemTags.BLACK_COFFEE_BOTTLES).input(Items.WHEAT).input(Items.SUGAR).input(ConventionalItemTags.MILK_BUCKETS).input(Items.EGG).group("tiramisu").criterion("has_black_coffee_bottle", conditionsFromTag(CaffeinatedItemTags.BLACK_COFFEE_BOTTLES)).offerTo(exporter);
ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, CaffeinatedBlocks.TIRAMISU).input('#', CaffeinatedItems.TIRAMISU_SLICE).pattern("##").pattern("##").group("tiramisu").criterion("has_tiramisu_slice", conditionsFromItem(CaffeinatedItems.TIRAMISU_SLICE)).offerTo(exporter, new Identifier(Caffeinated.MODID, "tiramisu_from_slices"));

CoffeeBrewingRecipeJsonBuilder.create(Ingredient.ofItems(Items.POTION), Ingredient.ofItems(CaffeinatedItems.GROUND_COFFEE), RecipeCategory.FOOD, CaffeinatedItems.COFFEE_BOTTLE, 1.0F, 600).criterion(hasItem(CaffeinatedItems.GROUND_COFFEE), conditionsFromItem(CaffeinatedItems.GROUND_COFFEE)).offerTo(exporter);
CoffeeBrewingRecipeJsonBuilder.create(Ingredient.ofItems(Items.POTION), Ingredient.ofItems(CaffeinatedItems.GROUND_COFFEE), RecipeCategory.FOOD, CaffeinatedItems.BLACK_COFFEE_BOTTLE, 1.0F, 600).criterion(hasItem(CaffeinatedItems.GROUND_COFFEE), conditionsFromItem(CaffeinatedItems.GROUND_COFFEE)).offerTo(exporter);
CoffeeBrewingRecipeJsonBuilder.create(Ingredient.fromTag(CaffeinatedItemTags.BLACK_COFFEE_BOTTLES), Ingredient.fromTag(ConventionalItemTags.MILK_BUCKETS), RecipeCategory.FOOD, CaffeinatedItems.LATTE_COFFEE_BOTTLE, 1.0F, 600).criterion(hasItem(Items.MILK_BUCKET), conditionsFromTag(ConventionalItemTags.MILK_BUCKETS)).offerTo(exporter);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public void run() {
String recipeBookGroup = mappingResolver.mapClassName("intermediary", "net.minecraft.class_314");
String itemStack = "[L" + mappingResolver.mapClassName("intermediary", "net.minecraft.class_1799") + ';';
ClassTinkerers.enumBuilder(recipeBookGroup, itemStack).addEnum("CAFFEINATED_SMOKER_MISC", () -> new Object[]{new ItemStack[]{new ItemStack(Items.LAVA_BUCKET), new ItemStack(CaffeinatedItems.COFFEE_BERRIES)}}).build();
ClassTinkerers.enumBuilder(recipeBookGroup, itemStack).addEnum("CAFFEINATED_COFFEE_BREWING", () -> new Object[]{new ItemStack[]{new ItemStack(CaffeinatedItems.COFFEE_BOTTLE)}}).build();
ClassTinkerers.enumBuilder(recipeBookGroup, itemStack).addEnum("CAFFEINATED_COFFEE_BREWING", () -> new Object[]{new ItemStack[]{new ItemStack(CaffeinatedItems.BLACK_COFFEE_BOTTLE)}}).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.chikoritalover.caffeinated.registry.CaffeinatedSoundEvents;
import com.chikoritalover.caffeinated.registry.CaffeinatedStats;
import com.google.common.collect.Maps;
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags;
import net.minecraft.block.*;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityTicker;
Expand All @@ -27,6 +28,7 @@
import net.minecraft.potion.Potions;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.stat.Stats;
import net.minecraft.state.StateManager;
Expand Down Expand Up @@ -74,6 +76,16 @@ public CauldronCampfireBlock(Block baseBlock, ParticleEffect particleEffect, Set
this.setDefaultState(this.getStateManager().getDefaultState().with(FILLED, false).with(LIT, true).with(WATERLOGGED, false).with(FACING, Direction.NORTH));
}

private static SoundEvent getEmptySoundEvent(ItemStack stack) {
if (stack.getRecipeRemainder().isOf(Items.GLASS_BOTTLE)) {
return SoundEvents.ITEM_BOTTLE_EMPTY;
}
if (stack.getRecipeRemainder().isIn(ConventionalItemTags.EMPTY_BUCKETS)) {
return SoundEvents.ITEM_BUCKET_EMPTY;
}
return CaffeinatedSoundEvents.ITEM_GROUND_COFFEE_SPLASH;
}

public static void extinguish(@Nullable Entity entity, WorldAccess world, BlockPos pos, BlockState state) {
if (world.isClient()) {
for (int i = 0; i < 20; i++) {
Expand Down Expand Up @@ -113,27 +125,25 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt
if (!world.isClient()) {
if (bl) {
cauldronCampfire.addBaseIngredient(player, stack);
world.playSound(null, pos, getEmptySoundEvent(stack), SoundCategory.BLOCKS, 1.0F, 1.0F);
player.setStackInHand(hand, ItemUsage.exchangeStack(stack, player, item.getRecipeRemainder(stack)));
world.playSound(null, pos, SoundEvents.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
world.emitGameEvent(null, GameEvent.FLUID_PLACE, pos);
} else if (bl2) {
cauldronCampfire.addReagent(player, stack);
world.playSound(null, pos, getEmptySoundEvent(stack), SoundCategory.BLOCKS, 1.0F, 1.0F);
player.setStackInHand(hand, ItemUsage.exchangeStack(stack, player, item.getRecipeRemainder(stack)));
world.playSound(null, pos, CaffeinatedSoundEvents.ITEM_GROUND_COFFEE_SPLASH, SoundCategory.BLOCKS, 1.0F, 1.0F);
world.emitGameEvent(null, GameEvent.BLOCK_CHANGE, pos);
} else {
ItemStack itemStack = item2.getDefaultStack();
ServerPlayerEntity serverPlayer = (ServerPlayerEntity) player;
if (stack.isOf(item2.getRecipeRemainder())) {
player.setStackInHand(hand, ItemUsage.exchangeStack(stack, player, item2.getDefaultStack()));
player.setStackInHand(hand, ItemUsage.exchangeStack(stack, player, itemStack));
} else {
player.giveItemStack(item2.getDefaultStack());
player.giveItemStack(itemStack);
}
cauldronCampfire.clear();
cauldronCampfire.dropExperienceForRecipesUsed((ServerPlayerEntity) player);
world.playSound(null, pos, SoundEvents.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
world.emitGameEvent(null, GameEvent.FLUID_PICKUP, pos);
Caffeinated.BREW_COFFEE_CRITERION.trigger(serverPlayer, itemStack);
}
player.incrementStat(Stats.USED.getOrCreateStat(item));
player.incrementStat(CaffeinatedStats.INTERACT_WITH_CAULDRON_CAMPFIRE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
import com.chikoritalover.caffeinated.recipe.CoffeeBrewingRecipe;
import com.chikoritalover.caffeinated.registry.CaffeinatedItems;
import com.chikoritalover.caffeinated.registry.CaffeinatedSoundEvents;
import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.AbstractFurnaceBlockEntity;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.color.world.BiomeColors;
import net.minecraft.entity.Entity;
Expand All @@ -29,7 +25,6 @@
import net.minecraft.particle.ParticleTypes;
import net.minecraft.potion.PotionUtil;
import net.minecraft.potion.Potions;
import net.minecraft.recipe.AbstractCookingRecipe;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeManager;
import net.minecraft.recipe.RecipeUnlocker;
Expand All @@ -47,7 +42,6 @@
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

public class CauldronCampfireBlockEntity extends BlockEntity implements RecipeUnlocker {
Expand Down Expand Up @@ -197,7 +191,7 @@ public int getColor() {
if (this.getStack(0).isOf(Items.POTION)) {
return BiomeColors.getWaterColor(this.getWorld(), this.getPos());
}
if (this.getStack(0).isOf(CaffeinatedItems.COFFEE_BOTTLE)) {
if (this.getStack(0).isOf(CaffeinatedItems.BLACK_COFFEE_BOTTLE)) {
return 0x4A2E20;
}
return -1;
Expand Down Expand Up @@ -225,6 +219,7 @@ public void dropExperienceForRecipesUsed(ServerPlayerEntity player) {
for (Recipe<?> recipe : arrayList) {
if (recipe == null) continue;
player.onRecipeCrafted(recipe, this.inventory);
Caffeinated.BREW_COFFEE_CRITERION.trigger(player, recipe.getOutput(this.getWorld().getRegistryManager()));
dropExperience(player.getServerWorld(), player.getPos(), ((CoffeeBrewingRecipe) recipe).getExperience());
}
this.recipesUsed.clear();
Expand Down
Loading

0 comments on commit 874b648

Please sign in to comment.