From d5657b2aa6f58a3d3198aa9c399641374f8d9ff9 Mon Sep 17 00:00:00 2001
From: Doppel_R <123340279+Doppel-R101@users.noreply.github.com>
Date: Tue, 26 May 2026 11:37:32 +0200
Subject: [PATCH 1/3] Update README.md
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 4ef289d..1e7db80 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-

+
---
-**Create: Lemon-Mates** is a refreshing addon mod for Create, adding various lemonade drinks
+**Create: Lemon-Mates** is a refreshing addon mod for Create, adding various lemonade drinks
and everything you need to produce them - bottles, labels, caps, fruits and of course lemonade.
Build your own lemonade factory with fully automated Create assembly lines!
-
+
### New Fruits
From d4501b0417f307c64aaa5a8d70982664fc2cb61b Mon Sep 17 00:00:00 2001
From: Dakota
Date: Thu, 28 May 2026 15:01:36 -0500
Subject: [PATCH 2/3] Dev Commit
---
.../lemonmates/AllBlockStateProperties.java | 21 +
.../lemonmates/AllCreativeModeTabs.java | 4 +
.../doppelr/lemonmates/AllDataComponents.java | 42 +
.../net/doppelr/lemonmates/LemonMates.java | 11 +-
.../doppelr/lemonmates/block/ModBlocks.java | 8 +
.../block/ModDrinkingGlassBlock.java | 270 +++-
.../doppelr/lemonmates/block/ModJugBlock.java | 72 ++
.../ApplicableFluidsToFluidContainer.java | 39 +
.../block/properties/FruitSlices.java | 18 +
.../block/properties/StrawsVariants.java | 31 +
.../block/properties/UmbrellaVariants.java | 20 +
.../datagen/ModBlockLootTableProvider.java | 2 +-
.../net/doppelr/lemonmates/item/ModItems.java | 6 +-
.../doppelr/lemonmates/item/ModJugItem.java | 125 ++
.../blockstates/lemonade_glass.json | 1129 ++++++++++++++++-
.../blockstates/terracotta_lemonade_jug.json | 81 ++
.../models/block/ice_cube_full.json | 57 +
.../models/block/ice_cube_half.json | 85 ++
.../lemonade_glass_fluid_full_yellow.json | 29 +
.../lemonade_glass_fluid_half_yellow.json | 29 +
.../models/block/lemonade_jug_fluid_1.json | 5 +-
.../models/block/lemonade_jug_fluid_2.json | 5 +-
.../models/block/lemonade_jug_fluid_3.json | 5 +-
.../models/block/lemonade_jug_fluid_4.json | 5 +-
.../models/block/lemonade_jug_fluid_5.json | 5 +-
.../models/block/lemonade_jug_fluid_6.json | 5 +-
.../models/block/lemonade_jug_fluid_7.json | 5 +-
.../models/block/lemonade_jug_fluid_8.json | 5 +-
.../models/block/lemonade_jug_terracotta.json | 5 +-
.../models/item/terracotta_lemonade_jug.json | 3 +
.../item/lemonade_jug_hardened_clay.png | Bin 0 -> 447 bytes
31 files changed, 2083 insertions(+), 44 deletions(-)
create mode 100644 src/main/java/net/doppelr/lemonmates/AllBlockStateProperties.java
create mode 100644 src/main/java/net/doppelr/lemonmates/AllDataComponents.java
create mode 100644 src/main/java/net/doppelr/lemonmates/block/ModJugBlock.java
create mode 100644 src/main/java/net/doppelr/lemonmates/block/properties/ApplicableFluidsToFluidContainer.java
create mode 100644 src/main/java/net/doppelr/lemonmates/block/properties/FruitSlices.java
create mode 100644 src/main/java/net/doppelr/lemonmates/block/properties/StrawsVariants.java
create mode 100644 src/main/java/net/doppelr/lemonmates/block/properties/UmbrellaVariants.java
create mode 100644 src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
create mode 100644 src/main/resources/assets/lemonmates/blockstates/terracotta_lemonade_jug.json
create mode 100644 src/main/resources/assets/lemonmates/models/block/ice_cube_full.json
create mode 100644 src/main/resources/assets/lemonmates/models/block/ice_cube_half.json
create mode 100644 src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_full_yellow.json
create mode 100644 src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_half_yellow.json
create mode 100644 src/main/resources/assets/lemonmates/models/item/terracotta_lemonade_jug.json
create mode 100644 src/main/resources/assets/lemonmates/textures/item/lemonade_jug_hardened_clay.png
diff --git a/src/main/java/net/doppelr/lemonmates/AllBlockStateProperties.java b/src/main/java/net/doppelr/lemonmates/AllBlockStateProperties.java
new file mode 100644
index 0000000..6e4b1e9
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/AllBlockStateProperties.java
@@ -0,0 +1,21 @@
+package net.doppelr.lemonmates;
+
+import net.doppelr.lemonmates.block.properties.ApplicableFluidsToFluidContainer;
+import net.doppelr.lemonmates.block.properties.FruitSlices;
+import net.doppelr.lemonmates.block.properties.StrawsVariants;
+import net.doppelr.lemonmates.block.properties.UmbrellaVariants;
+import net.minecraft.world.level.block.state.properties.BooleanProperty;
+import net.minecraft.world.level.block.state.properties.EnumProperty;
+import net.minecraft.world.level.block.state.properties.IntegerProperty;
+
+public class AllBlockStateProperties {
+ public static final IntegerProperty DRINK_LEVEL = IntegerProperty.create("drink_level", 0, 2);
+ public static final EnumProperty STRAWS = EnumProperty.create("straw", StrawsVariants.class);
+ public static final BooleanProperty ICE_CUBES = BooleanProperty.create("has_ice");
+ public static final EnumProperty FRUIT_SLICES = EnumProperty.create("fruit_slice", FruitSlices.class);
+ public static final EnumProperty UMBRELLAS = EnumProperty.create("umbrella", UmbrellaVariants.class);
+ public static final EnumProperty APPLICABLE_FLUID_TO_CONTAINER = EnumProperty.create("fluid", ApplicableFluidsToFluidContainer.class);
+
+ public static final IntegerProperty JUG_LEVEL = IntegerProperty.create("jug_level", 0, 8);
+ public static final BooleanProperty CAN_POUR = BooleanProperty.create("can_pour");
+}
diff --git a/src/main/java/net/doppelr/lemonmates/AllCreativeModeTabs.java b/src/main/java/net/doppelr/lemonmates/AllCreativeModeTabs.java
index dc5cbd2..96dc2d9 100644
--- a/src/main/java/net/doppelr/lemonmates/AllCreativeModeTabs.java
+++ b/src/main/java/net/doppelr/lemonmates/AllCreativeModeTabs.java
@@ -34,6 +34,10 @@ public class AllCreativeModeTabs {
output.accept(ModBlocks.ORANGE_CRATE);
output.accept(ModBlocks.RASPBERRY_CRATE);
+ // Misc
+ output.accept(ModBlocks.LEMONADE_GLASS);
+ output.accept(ModBlocks.TERRACOTTA_LEMONADE_JUG);
+
// Finished Lemonades
output.accept(ModItems.CITRON_LEMONADE_BOTTLE);
output.accept(ModItems.ORANGE_LEMONADE_BOTTLE);
diff --git a/src/main/java/net/doppelr/lemonmates/AllDataComponents.java b/src/main/java/net/doppelr/lemonmates/AllDataComponents.java
new file mode 100644
index 0000000..0fa512f
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/AllDataComponents.java
@@ -0,0 +1,42 @@
+package net.doppelr.lemonmates;
+
+import com.mojang.serialization.Codec;
+import net.doppelr.lemonmates.block.properties.ApplicableFluidsToFluidContainer;
+import net.minecraft.core.component.DataComponentType;
+import net.minecraft.core.registries.Registries;
+import net.minecraft.network.codec.ByteBufCodecs;
+import net.minecraft.util.ExtraCodecs;
+import net.neoforged.bus.api.IEventBus;
+import net.neoforged.neoforge.registries.DeferredRegister;
+
+import java.util.function.UnaryOperator;
+
+public class AllDataComponents {
+ private static final DeferredRegister.DataComponents DATA_COMPONENTS = DeferredRegister.createDataComponents(Registries.DATA_COMPONENT_TYPE, LemonMates.MOD_ID);
+
+ public static final DataComponentType JUG_LEVEL = register(
+ "jug_level",
+ builder -> builder.persistent(ExtraCodecs.NON_NEGATIVE_INT).networkSynchronized(ByteBufCodecs.VAR_INT)
+ );
+
+ public static final DataComponentType APPLICABLE_FLUID_TO_CONTAINER = register(
+ "fluid",
+ builder -> builder.persistent(ApplicableFluidsToFluidContainer.CODEC).networkSynchronized(ApplicableFluidsToFluidContainer.STREAM_CODEC)
+ );
+
+ public static final DataComponentType CAN_POUR = register(
+ "can_pour",
+ builder -> builder.persistent(Codec.BOOL).networkSynchronized(ByteBufCodecs.BOOL)
+ );
+
+ private static DataComponentType register(String name, UnaryOperator> builder) {
+ DataComponentType type = builder.apply(DataComponentType.builder()).build();
+ DATA_COMPONENTS.register(name, () -> type);
+ return type;
+ }
+
+ public static void register(IEventBus modEventBus) {
+ DATA_COMPONENTS.register(modEventBus);
+ }
+
+}
diff --git a/src/main/java/net/doppelr/lemonmates/LemonMates.java b/src/main/java/net/doppelr/lemonmates/LemonMates.java
index 1086ea1..88ed001 100644
--- a/src/main/java/net/doppelr/lemonmates/LemonMates.java
+++ b/src/main/java/net/doppelr/lemonmates/LemonMates.java
@@ -1,19 +1,17 @@
package net.doppelr.lemonmates;
+import com.mojang.logging.LogUtils;
import net.doppelr.lemonmates.block.ModBlocks;
import net.doppelr.lemonmates.block.entity.ModBlockEntities;
import net.doppelr.lemonmates.datagen.DataGenerators;
-import net.doppelr.lemonmates.fluid.ModFluids;
import net.doppelr.lemonmates.entity.ModEntities;
+import net.doppelr.lemonmates.fluid.ModFluids;
import net.doppelr.lemonmates.item.ModItems;
import net.minecraft.resources.ResourceLocation;
-import org.slf4j.Logger;
-
-import com.mojang.logging.LogUtils;
-
import net.neoforged.bus.api.IEventBus;
-import net.neoforged.fml.common.Mod;
import net.neoforged.fml.ModContainer;
+import net.neoforged.fml.common.Mod;
+import org.slf4j.Logger;
@Mod(LemonMates.MOD_ID)
public class LemonMates {
@@ -22,6 +20,7 @@ public class LemonMates {
public LemonMates(IEventBus modEventBus, ModContainer modContainer) {
AllCreativeModeTabs.register(modEventBus);
+ AllDataComponents.register(modEventBus);
ModItems.register(modEventBus);
ModBlocks.register(modEventBus);
diff --git a/src/main/java/net/doppelr/lemonmates/block/ModBlocks.java b/src/main/java/net/doppelr/lemonmates/block/ModBlocks.java
index 2bc44df..9b4add5 100644
--- a/src/main/java/net/doppelr/lemonmates/block/ModBlocks.java
+++ b/src/main/java/net/doppelr/lemonmates/block/ModBlocks.java
@@ -114,6 +114,14 @@ public class ModBlocks {
.sound(SoundType.GLASS)
));
+ public static final DeferredBlock TERRACOTTA_LEMONADE_JUG = registerBlockWithoutBlockItem("terracotta_lemonade_jug",
+ () -> new ModJugBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TERRACOTTA).noOcclusion()));
+
+ private static DeferredBlock registerBlockWithoutBlockItem(String name, Supplier block) {
+ DeferredBlock toReturn = BLOCKS.register(name, block);
+ return toReturn;
+ }
+
private static DeferredBlock registerBlock(String name, Supplier block) {
DeferredBlock toReturn = BLOCKS.register(name, block);
registerBlockItem(name, toReturn);
diff --git a/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java b/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java
index fc426db..436b6aa 100644
--- a/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java
+++ b/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java
@@ -1,23 +1,287 @@
package net.doppelr.lemonmates.block;
import com.mojang.serialization.MapCodec;
+import net.doppelr.lemonmates.AllBlockStateProperties;
+import net.doppelr.lemonmates.AllDataComponents;
+import net.doppelr.lemonmates.block.properties.ApplicableFluidsToFluidContainer;
+import net.doppelr.lemonmates.block.properties.FruitSlices;
+import net.doppelr.lemonmates.block.properties.StrawsVariants;
+import net.doppelr.lemonmates.block.properties.UmbrellaVariants;
+import net.doppelr.lemonmates.item.ModItems;
+import net.doppelr.lemonmates.item.ModJugItem;
+import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
+import net.minecraft.core.component.DataComponents;
+import net.minecraft.network.chat.Component;
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.sounds.SoundSource;
+import net.minecraft.world.InteractionHand;
+import net.minecraft.world.InteractionResult;
+import net.minecraft.world.ItemInteractionResult;
+import net.minecraft.world.entity.item.ItemEntity;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.TooltipFlag;
+import net.minecraft.world.item.component.BlockItemStateProperties;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
+import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
+import net.minecraft.world.level.block.state.properties.BooleanProperty;
+import net.minecraft.world.level.block.state.properties.EnumProperty;
+import net.minecraft.world.level.block.state.properties.IntegerProperty;
+import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.jetbrains.annotations.Nullable;
+import java.util.List;
+
public class ModDrinkingGlassBlock extends HorizontalDirectionalBlock {
- public static final MapCodec CODED = simpleCodec(ModDrinkingGlassBlock::new);
+ public static final MapCodec CODEC = simpleCodec(ModDrinkingGlassBlock::new);
private static final VoxelShape SHAPE = Block.box(5.0, 0, 5, 11, 7, 11);
+ public static final IntegerProperty DRINK_LEVEL = AllBlockStateProperties.DRINK_LEVEL;
+ public static final EnumProperty FLUID = AllBlockStateProperties.APPLICABLE_FLUID_TO_CONTAINER;
+ public static final EnumProperty STRAW = AllBlockStateProperties.STRAWS;
+ public static final EnumProperty FRUIT_SLICE = AllBlockStateProperties.FRUIT_SLICES;
+ public static final EnumProperty UMBRELLA = AllBlockStateProperties.UMBRELLAS;
+ public static final BooleanProperty ICE_CUBES = AllBlockStateProperties.ICE_CUBES;
+
protected ModDrinkingGlassBlock(Properties properties) {
super(properties);
+ this.registerDefaultState(this.defaultBlockState()
+ .setValue(FACING, Direction.SOUTH)
+ .setValue(DRINK_LEVEL, 0)
+ .setValue(FLUID, ApplicableFluidsToFluidContainer.NONE)
+ .setValue(STRAW, StrawsVariants.NONE)
+ .setValue(FRUIT_SLICE, FruitSlices.NONE)
+ .setValue(UMBRELLA, UmbrellaVariants.NONE)
+ .setValue(ICE_CUBES, false));
+ }
+
+ public void customConsumptionBehaviours(BlockState state, Player player) {}
+
+ @Override
+ protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) {
+ if (player.getMainHandItem().isEmpty() && state.getValue(DRINK_LEVEL) > 0 && state.getValue(FLUID) != ApplicableFluidsToFluidContainer.NONE) {
+ level.setBlockAndUpdate(pos, state.setValue(DRINK_LEVEL, state.getValue(DRINK_LEVEL) - 1));
+ level.playSound(player, pos, SoundEvents.GENERIC_DRINK, SoundSource.BLOCKS, 1.0F, 1.0F);
+ this.customConsumptionBehaviours(state, player);
+ player.getFoodData().eat(state.getValue(FLUID).getProperties());
+ return InteractionResult.sidedSuccess(level.isClientSide);
+ }
+
+ if (state.getValue(ICE_CUBES) && state.getValue(DRINK_LEVEL) == 1)
+ level.setBlockAndUpdate(pos, state.setValue(ICE_CUBES, false));
+
+ return super.useWithoutItem(state, level, pos, player, hitResult);
+ }
+
+ @Override
+ protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) {
+ if (stack.getItem() instanceof ModJugItem jugItem && Boolean.TRUE.equals(stack.get(AllDataComponents.CAN_POUR))) {
+ if (state.getValue(DRINK_LEVEL) != 2) {
+ if (stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) != null || stack.get(AllDataComponents.JUG_LEVEL) != 0) {
+ int newDrinkLevel = stack.get(AllDataComponents.JUG_LEVEL) > 0 ? 2 - state.getValue(DRINK_LEVEL) : 0;
+ if (stack.get(AllDataComponents.JUG_LEVEL) == 1 || state.getValue(DRINK_LEVEL) == 1)
+ newDrinkLevel = 1;
+ int blockDrinkLevel = state.getValue(DRINK_LEVEL) == 1 ? 2 : newDrinkLevel;
+ ApplicableFluidsToFluidContainer pouredFluid = stack.get(AllDataComponents.JUG_LEVEL) > 0 ? stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) : state.getValue(FLUID);
+ level.setBlockAndUpdate(pos, state.setValue(FLUID, pouredFluid)
+ .setValue(DRINK_LEVEL, blockDrinkLevel));
+ jugItem.removeFromJugLevel(stack, newDrinkLevel);
+ }
+ } else {
+ return ItemInteractionResult.FAIL;
+ }
+ }
+
+ if (stack.is(ModItems.STRAW_BASIC)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.BASIC));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_RAINBOW)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.RAINBOW));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_TRANS)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.TRANS));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_NONBINARY)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.NONBINARY));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_LESBIAN)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.LESBIAN));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_GAY)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.GAY));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_GENDERFLUID)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.GENDERFLUID));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_ACE)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.ACE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_ARO)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.ARO));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_AROACE)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.AROACE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_AGENDER)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.AGENDER));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_BI)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.BI));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_PAN)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.PAN));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_GERMAN)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.GERMAN));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ if (stack.is(ModItems.STRAW_OMNISEXUAL)) {
+ level.setBlockAndUpdate(pos, state.setValue(STRAW, StrawsVariants.OMNISEXUAL));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ // Each straw follows this same logic, duplicate as necessary
+
+ if (stack.is(ModItems.CITRON_SLICE)) {
+ level.setBlockAndUpdate(pos, state.setValue(FRUIT_SLICE, FruitSlices.CITRON));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+
+ if (stack.is(ModItems.ORANGE_SLICE)) {
+ level.setBlockAndUpdate(pos, state.setValue(FRUIT_SLICE, FruitSlices.ORANGE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ // Each slice follows this same logic, duplicate as necessary
+
+ if (stack.is(ModItems.DRINK_UMBRELLA_1)) {
+ level.setBlockAndUpdate(pos, state.setValue(UMBRELLA, UmbrellaVariants.RED_WHITE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+
+ if (stack.is(ModItems.DRINK_UMBRELLA_2)) {
+ level.setBlockAndUpdate(pos, state.setValue(UMBRELLA, UmbrellaVariants.YELLOW_WHITE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+
+ if (stack.is(ModItems.DRINK_UMBRELLA_3)) {
+ level.setBlockAndUpdate(pos, state.setValue(UMBRELLA, UmbrellaVariants.BLACK_PURPLE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+
+ if (stack.is(ModItems.DRINK_UMBRELLA_4)) {
+ level.setBlockAndUpdate(pos, state.setValue(UMBRELLA, UmbrellaVariants.ORANGE_WHITE));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+ // Each umbrella follows this same logic, duplicate as necessary
+
+ if (stack.is(ModItems.ICE_CUBES)) {
+ level.setBlockAndUpdate(pos, state.setValue(ICE_CUBES, true));
+ if (!player.getAbilities().instabuild)
+ stack.shrink(1);
+ return ItemInteractionResult.sidedSuccess(level.isClientSide);
+ }
+
+ return super.useItemOn(stack, state, level, pos, player, hand, hitResult);
+ }
+
+ @Override
+ public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) {
+ if (!level.isClientSide) {
+ ItemStack itemStack = new ItemStack(this);
+ int drinkLevel = state.getValue(DRINK_LEVEL);
+ StrawsVariants straw = state.getValue(STRAW);
+ ApplicableFluidsToFluidContainer fluid = state.getValue(FLUID);
+ FruitSlices fruitSlice = state.getValue(FRUIT_SLICE);
+ UmbrellaVariants umbrella = state.getValue(UMBRELLA);
+ boolean iceCubes = state.getValue(ICE_CUBES);
+
+ if (drinkLevel < 2 || straw != StrawsVariants.NONE || fluid != ApplicableFluidsToFluidContainer.NONE || fruitSlice != FruitSlices.NONE || umbrella != UmbrellaVariants.NONE || iceCubes) {
+ itemStack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY
+ .with(AllBlockStateProperties.DRINK_LEVEL, drinkLevel)
+ .with(AllBlockStateProperties.STRAWS, straw)
+ .with(AllBlockStateProperties.APPLICABLE_FLUID_TO_CONTAINER, fluid)
+ .with(AllBlockStateProperties.FRUIT_SLICES, fruitSlice)
+ .with(AllBlockStateProperties.UMBRELLAS, umbrella)
+ .with(AllBlockStateProperties.ICE_CUBES, iceCubes));
+ }
+
+ ItemEntity itemEntity = new ItemEntity(level, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, itemStack);
+ itemEntity.setDefaultPickUpDelay();
+ level.addFreshEntity(itemEntity);
+ }
+ return super.playerWillDestroy(level, pos, state, player);
+ }
+
+ @Override
+ public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) {
+ super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
+
+ if (stack.has(DataComponents.BLOCK_STATE))
+ tooltipComponents.add(Component.literal("Has Decorations Applied").withStyle(ChatFormatting.ITALIC, ChatFormatting.GRAY));
}
@Override
@@ -27,7 +291,7 @@ protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos,
@Override
protected MapCodec extends HorizontalDirectionalBlock> codec() {
- return CODED;
+ return CODEC;
}
@Nullable
@@ -38,6 +302,6 @@ public BlockState getStateForPlacement(BlockPlaceContext context) {
@Override
protected void createBlockStateDefinition(StateDefinition.Builder builder) {
- builder.add(FACING);
+ builder.add(FACING, STRAW, FRUIT_SLICE, UMBRELLA, DRINK_LEVEL, ICE_CUBES, FLUID);
}
}
diff --git a/src/main/java/net/doppelr/lemonmates/block/ModJugBlock.java b/src/main/java/net/doppelr/lemonmates/block/ModJugBlock.java
new file mode 100644
index 0000000..913d468
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/block/ModJugBlock.java
@@ -0,0 +1,72 @@
+package net.doppelr.lemonmates.block;
+
+import net.doppelr.lemonmates.AllBlockStateProperties;
+import net.doppelr.lemonmates.AllDataComponents;
+import net.doppelr.lemonmates.block.properties.ApplicableFluidsToFluidContainer;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.component.DataComponentMap;
+import net.minecraft.core.component.DataComponents;
+import net.minecraft.world.entity.item.ItemEntity;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.component.BlockItemStateProperties;
+import net.minecraft.world.level.BlockGetter;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.block.state.StateDefinition;
+import net.minecraft.world.level.block.state.properties.BooleanProperty;
+import net.minecraft.world.level.block.state.properties.EnumProperty;
+import net.minecraft.world.level.block.state.properties.IntegerProperty;
+import net.minecraft.world.phys.shapes.CollisionContext;
+import net.minecraft.world.phys.shapes.VoxelShape;
+
+public class ModJugBlock extends Block {
+ private static final VoxelShape SHAPE = Block.box(5, 0, 5, 11, 10, 11);
+
+ public static final IntegerProperty JUG_LEVEL = AllBlockStateProperties.JUG_LEVEL;
+ public static final EnumProperty FLUID = AllBlockStateProperties.APPLICABLE_FLUID_TO_CONTAINER;
+ public static final BooleanProperty CAN_POUR = AllBlockStateProperties.CAN_POUR;
+ public ModJugBlock(Properties properties) {
+ super(properties);
+ this.registerDefaultState(this.defaultBlockState().setValue(JUG_LEVEL, 0).setValue(FLUID, ApplicableFluidsToFluidContainer.NONE).setValue(CAN_POUR, false));
+ }
+
+ @Override
+ public BlockState playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) {
+ if (!level.isClientSide) {
+ ItemStack itemStack = new ItemStack(this);
+ int jugLevel = state.getValue(JUG_LEVEL);
+ ApplicableFluidsToFluidContainer fluid = state.getValue(FLUID);
+ boolean canPour = state.getValue(CAN_POUR);
+
+ if (jugLevel > 0 || fluid != ApplicableFluidsToFluidContainer.NONE || canPour) {
+ DataComponentMap.Builder map = DataComponentMap.builder();
+ map.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY
+ .with(AllBlockStateProperties.JUG_LEVEL, jugLevel)
+ .with(AllBlockStateProperties.APPLICABLE_FLUID_TO_CONTAINER, fluid)
+ .with(AllBlockStateProperties.CAN_POUR, canPour))
+ .set(AllDataComponents.JUG_LEVEL, jugLevel)
+ .set(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER, fluid)
+ .set(AllDataComponents.CAN_POUR, canPour);
+
+ itemStack.applyComponents(map.build());
+ }
+
+ ItemEntity itemEntity = new ItemEntity(level, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, itemStack);
+ itemEntity.setDefaultPickUpDelay();
+ level.addFreshEntity(itemEntity);
+ }
+ return super.playerWillDestroy(level, pos, state, player);
+ }
+
+ @Override
+ protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
+ return SHAPE;
+ }
+
+ @Override
+ protected void createBlockStateDefinition(StateDefinition.Builder builder) {
+ builder.add(JUG_LEVEL, FLUID, CAN_POUR);
+ }
+}
diff --git a/src/main/java/net/doppelr/lemonmates/block/properties/ApplicableFluidsToFluidContainer.java b/src/main/java/net/doppelr/lemonmates/block/properties/ApplicableFluidsToFluidContainer.java
new file mode 100644
index 0000000..95c3f36
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/block/properties/ApplicableFluidsToFluidContainer.java
@@ -0,0 +1,39 @@
+package net.doppelr.lemonmates.block.properties;
+
+import com.mojang.serialization.Codec;
+import io.netty.buffer.ByteBuf;
+import net.createmod.catnip.codecs.stream.CatnipStreamCodecBuilders;
+import net.minecraft.network.codec.StreamCodec;
+import net.minecraft.util.StringRepresentable;
+import net.minecraft.world.effect.MobEffectInstance;
+import net.minecraft.world.effect.MobEffects;
+import net.minecraft.world.food.FoodProperties;
+
+import java.util.Locale;
+
+public enum ApplicableFluidsToFluidContainer implements StringRepresentable {
+ NONE,
+ LEMONADE(new FoodProperties.Builder().effect(() -> new MobEffectInstance(MobEffects.REGENERATION, 200, 2), 1.0F).build()),
+ CITRON_LEMONADE(new FoodProperties.Builder().effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 200, 2), 1.0F).build()),;
+
+ final FoodProperties properties;
+ public static final Codec CODEC = StringRepresentable.fromEnum(ApplicableFluidsToFluidContainer::values);
+ public static final StreamCodec STREAM_CODEC = CatnipStreamCodecBuilders.ofEnum(ApplicableFluidsToFluidContainer.class);
+
+ ApplicableFluidsToFluidContainer() {
+ this.properties = new FoodProperties.Builder().build();
+ }
+
+ ApplicableFluidsToFluidContainer(FoodProperties properties) {
+ this.properties = properties;
+ }
+
+ public FoodProperties getProperties() {
+ return properties;
+ }
+
+ @Override
+ public String getSerializedName() {
+ return name().toLowerCase(Locale.ROOT);
+ }
+}
diff --git a/src/main/java/net/doppelr/lemonmates/block/properties/FruitSlices.java b/src/main/java/net/doppelr/lemonmates/block/properties/FruitSlices.java
new file mode 100644
index 0000000..9aa797e
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/block/properties/FruitSlices.java
@@ -0,0 +1,18 @@
+package net.doppelr.lemonmates.block.properties;
+
+import net.minecraft.util.StringRepresentable;
+
+import java.util.Locale;
+
+public enum FruitSlices implements StringRepresentable {
+ NONE,
+ CITRON,
+ ORANGE,;
+
+ FruitSlices() {}
+
+ @Override
+ public String getSerializedName() {
+ return name().toLowerCase(Locale.ROOT);
+ }
+}
diff --git a/src/main/java/net/doppelr/lemonmates/block/properties/StrawsVariants.java b/src/main/java/net/doppelr/lemonmates/block/properties/StrawsVariants.java
new file mode 100644
index 0000000..d8547bc
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/block/properties/StrawsVariants.java
@@ -0,0 +1,31 @@
+package net.doppelr.lemonmates.block.properties;
+
+import net.minecraft.util.StringRepresentable;
+
+import java.util.Locale;
+
+public enum StrawsVariants implements StringRepresentable {
+ NONE,
+ BASIC,
+ RAINBOW,
+ TRANS,
+ NONBINARY,
+ LESBIAN,
+ GAY,
+ GENDERFLUID,
+ ACE,
+ ARO,
+ AROACE,
+ AGENDER,
+ BI,
+ PAN,
+ GERMAN,
+ OMNISEXUAL,;
+
+ StrawsVariants() {}
+
+ @Override
+ public String getSerializedName() {
+ return name().toLowerCase(Locale.ROOT);
+ }
+}
diff --git a/src/main/java/net/doppelr/lemonmates/block/properties/UmbrellaVariants.java b/src/main/java/net/doppelr/lemonmates/block/properties/UmbrellaVariants.java
new file mode 100644
index 0000000..edd2889
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/block/properties/UmbrellaVariants.java
@@ -0,0 +1,20 @@
+package net.doppelr.lemonmates.block.properties;
+
+import net.minecraft.util.StringRepresentable;
+
+import java.util.Locale;
+
+public enum UmbrellaVariants implements StringRepresentable {
+ NONE,
+ RED_WHITE,
+ YELLOW_WHITE,
+ BLACK_PURPLE,
+ ORANGE_WHITE,;
+
+ UmbrellaVariants() {}
+
+ @Override
+ public String getSerializedName() {
+ return name().toLowerCase(Locale.ROOT);
+ }
+}
diff --git a/src/main/java/net/doppelr/lemonmates/datagen/ModBlockLootTableProvider.java b/src/main/java/net/doppelr/lemonmates/datagen/ModBlockLootTableProvider.java
index c861e0c..1ae67da 100644
--- a/src/main/java/net/doppelr/lemonmates/datagen/ModBlockLootTableProvider.java
+++ b/src/main/java/net/doppelr/lemonmates/datagen/ModBlockLootTableProvider.java
@@ -125,7 +125,7 @@ protected void generate() {
dropSelf(ModBlocks.CITRON_CRATE.get());
dropSelf(ModBlocks.RASPBERRY_CRATE.get());
- dropSelf(ModBlocks.LEMONADE_GLASS.get());
+ add(ModBlocks.LEMONADE_GLASS.get(), noDrop());
}
@Override
diff --git a/src/main/java/net/doppelr/lemonmates/item/ModItems.java b/src/main/java/net/doppelr/lemonmates/item/ModItems.java
index 9c5c03c..e76765a 100644
--- a/src/main/java/net/doppelr/lemonmates/item/ModItems.java
+++ b/src/main/java/net/doppelr/lemonmates/item/ModItems.java
@@ -1,8 +1,8 @@
package net.doppelr.lemonmates.item;
import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem;
-import net.doppelr.lemonmates.LemonMates;
import net.doppelr.lemonmates.AllFoodProperties;
+import net.doppelr.lemonmates.LemonMates;
import net.doppelr.lemonmates.block.ModBlocks;
import net.doppelr.lemonmates.entity.ModBoatEntity;
import net.minecraft.world.item.HangingSignItem;
@@ -191,13 +191,13 @@ public class ModItems {
public static final DeferredItem- DRINK_UMBRELLA_4 = ITEMS.register("drink_umbrella_4",
() -> new Item(new Item.Properties()));
+ public static final DeferredItem
- TERRACOTTA_LEMONADE_JUG = ITEMS.register("terracotta_lemonade_jug",
+ () -> new ModJugItem(ModBlocks.TERRACOTTA_LEMONADE_JUG.get(), new Item.Properties().stacksTo(1)));
// Serving related
public static final DeferredItem
- ICE_CUBES = ITEMS.register("ice_cubes",
() -> new Item(new Item.Properties()));
-
-
public static void register(IEventBus eventBus) {
ITEMS.register(eventBus);
}
diff --git a/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java b/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
new file mode 100644
index 0000000..baba71e
--- /dev/null
+++ b/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
@@ -0,0 +1,125 @@
+package net.doppelr.lemonmates.item;
+
+import net.doppelr.lemonmates.AllBlockStateProperties;
+import net.doppelr.lemonmates.AllDataComponents;
+import net.doppelr.lemonmates.block.ModDrinkingGlassBlock;
+import net.doppelr.lemonmates.block.properties.ApplicableFluidsToFluidContainer;
+import net.minecraft.ChatFormatting;
+import net.minecraft.core.BlockPos;
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.InteractionHand;
+import net.minecraft.world.InteractionResult;
+import net.minecraft.world.InteractionResultHolder;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.BlockItem;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.TooltipFlag;
+import net.minecraft.world.item.context.BlockPlaceContext;
+import net.minecraft.world.item.context.UseOnContext;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.state.BlockState;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.List;
+
+public class ModJugItem extends BlockItem {
+ public ModJugItem(Block block, Properties properties) {
+ super(block, properties);
+ }
+
+ public void setPourAbility(ItemStack stack, boolean pour) {
+ stack.set(AllDataComponents.CAN_POUR, pour);
+ }
+
+ public void setContainedFluid(ItemStack stack, ApplicableFluidsToFluidContainer fluid) {
+ stack.set(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER, fluid);
+ }
+
+ public void setJugLevel(ItemStack stack, int jugLevel) {
+ stack.set(AllDataComponents.JUG_LEVEL, jugLevel);
+ }
+
+ public void addToJugLevel(ItemStack stack, int increment) {
+ if (stack.get(AllDataComponents.JUG_LEVEL) != null)
+ stack.set(AllDataComponents.JUG_LEVEL, stack.get(AllDataComponents.JUG_LEVEL) + increment);
+ }
+
+ public void removeFromJugLevel(ItemStack stack, int decrement) {
+ if (stack.get(AllDataComponents.JUG_LEVEL) != null) {
+ int f = stack.get(AllDataComponents.JUG_LEVEL) - decrement;
+ if (f >= 0 && f <= 8)
+ stack.set(AllDataComponents.JUG_LEVEL, stack.get(AllDataComponents.JUG_LEVEL) - decrement);
+ }
+ }
+
+ public void jugLevelHandling(ItemStack stack, ApplicableFluidsToFluidContainer fluid) {
+ if (stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) != fluid)
+ this.setContainedFluid(stack, fluid);
+
+ if (stack.get(AllDataComponents.JUG_LEVEL) == null || stack.get(AllDataComponents.JUG_LEVEL) == 0) {
+ this.setJugLevel(stack, 4);
+ } else if (stack.get(AllDataComponents.JUG_LEVEL) <= 4) {
+ this.addToJugLevel(stack, 4);
+ } else if (stack.get(AllDataComponents.JUG_LEVEL) < 8) {
+ int incrementJugLevel = 4;
+ if (stack.get(AllDataComponents.JUG_LEVEL) > 4)
+ incrementJugLevel = 8 - stack.get(AllDataComponents.JUG_LEVEL);
+ this.addToJugLevel(stack, incrementJugLevel);
+ }
+ }
+
+ @Override
+ protected @Nullable BlockState getPlacementState(BlockPlaceContext context) {
+ ItemStack stack = context.getItemInHand();
+ BlockState blockstate = this.getBlock().defaultBlockState();
+ ApplicableFluidsToFluidContainer fluid = stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) != null ? stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) : ApplicableFluidsToFluidContainer.NONE;
+ int jugLevel = stack.get(AllDataComponents.JUG_LEVEL) != null ? stack.get(AllDataComponents.JUG_LEVEL) : 0;
+ boolean canPour = stack.get(AllDataComponents.CAN_POUR) != null ? stack.get(AllDataComponents.CAN_POUR) : false;
+ return this.canPlace(context, blockstate) ? blockstate
+ .setValue(AllBlockStateProperties.APPLICABLE_FLUID_TO_CONTAINER, fluid)
+ .setValue(AllBlockStateProperties.JUG_LEVEL, jugLevel)
+ .setValue(AllBlockStateProperties.CAN_POUR, canPour) : null;
+ }
+
+ @Override
+ public InteractionResult useOn(UseOnContext context) {
+ ItemStack stack = context.getItemInHand();
+ Level level = context.getLevel();
+ BlockPos pos = context.getClickedPos();
+ BlockState state = level.getBlockState(pos);
+ if (stack.get(AllDataComponents.CAN_POUR) && state.getBlock() instanceof ModDrinkingGlassBlock)
+ return InteractionResult.SUCCESS;
+ return super.useOn(context);
+ }
+
+ @Override
+ public @NotNull InteractionResultHolder use(Level level, Player player, @NotNull InteractionHand usedHand) {
+ ItemStack stack = player.getItemInHand(usedHand);
+
+ if (!level.isClientSide()) {
+ ItemStack offHandStack = player.getOffhandItem();
+
+ if (player.isShiftKeyDown() && offHandStack.isEmpty()) {
+ this.setPourAbility(stack, !Boolean.TRUE.equals(stack.get(AllDataComponents.CAN_POUR)));
+ } else if (Boolean.FALSE.equals(stack.get(AllDataComponents.CAN_POUR))) {
+ if (stack.get(AllDataComponents.JUG_LEVEL) == null || stack.get(AllDataComponents.JUG_LEVEL) <= 4) {
+ if (offHandStack.is(ModItems.SUMMERMIX_LEMONADE_BOTTLE))
+ this.jugLevelHandling(stack, ApplicableFluidsToFluidContainer.LEMONADE);
+ if (offHandStack.is(ModItems.CITRON_LEMONADE_BOTTLE))
+ this.jugLevelHandling(stack, ApplicableFluidsToFluidContainer.CITRON_LEMONADE);
+ }
+ }
+ }
+
+ return InteractionResultHolder.success(stack);
+ }
+
+ @Override
+ public void appendHoverText(ItemStack stack, @NotNull TooltipContext context, @NotNull List tooltipComponents, @NotNull TooltipFlag tooltipFlag) {
+ if (stack.get(AllDataComponents.CAN_POUR) != null) {
+ tooltipComponents.add(Component.literal("Can Pour: " + stack.get(AllDataComponents.CAN_POUR)).withStyle(ChatFormatting.DARK_GREEN));
+ }
+ }
+}
diff --git a/src/main/resources/assets/lemonmates/blockstates/lemonade_glass.json b/src/main/resources/assets/lemonmates/blockstates/lemonade_glass.json
index 015a559..908bc78 100644
--- a/src/main/resources/assets/lemonmates/blockstates/lemonade_glass.json
+++ b/src/main/resources/assets/lemonmates/blockstates/lemonade_glass.json
@@ -1,19 +1,1122 @@
{
- "variants": {
- "facing=north": {
- "model": "lemonmates:block/lemonade_glass"
+ "multipart": [
+ {
+ "when": {
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass"
+ }
},
- "facing=south": {
- "model": "lemonmates:block/lemonade_glass",
- "y": 180
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "north",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half"
+ }
},
- "facing=east": {
- "model": "lemonmates:block/lemonade_glass",
- "y": 90
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "north",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full"
+ }
},
- "facing=west": {
- "model": "lemonmates:block/lemonade_glass",
- "y": 270
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "north",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half_yellow"
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "north",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full_yellow"
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "2",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_full"
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "1",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_half"
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "citron",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemon_slice"
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "orange",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/orange_slice"
+ }
+ },
+ {
+ "when": {
+ "umbrella": "red_white",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_1"
+ }
+ },
+ {
+ "when": {
+ "umbrella": "yellow_white",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_2"
+ }
+ },
+ {
+ "when": {
+ "umbrella": "black_purple",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_3"
+ }
+ },
+ {
+ "when": {
+ "umbrella": "orange_white",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_4"
+ }
+ },
+ {
+ "when": {
+ "straw": "basic",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_basic"
+ }
+ },
+ {
+ "when": {
+ "straw": "rainbow",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_rainbow"
+ }
+ },
+ {
+ "when": {
+ "straw": "trans",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_trans"
+ }
+ },
+ {
+ "when": {
+ "straw": "nonbinary",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_nonbinary"
+ }
+ },
+ {
+ "when": {
+ "straw": "lesbian",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_lesbian"
+ }
+ },
+ {
+ "when": {
+ "straw": "gay",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_gay"
+ }
+ },
+ {
+ "when": {
+ "straw": "genderfluid",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_genderfluid"
+ }
+ },
+ {
+ "when": {
+ "straw": "ace",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_ace"
+ }
+ },
+ {
+ "when": {
+ "straw": "aro",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aro"
+ }
+ },
+ {
+ "when": {
+ "straw": "aroace",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aroace"
+ }
+ },
+ {
+ "when": {
+ "straw": "agender",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_agender"
+ }
+ },
+ {
+ "when": {
+ "straw": "bi",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_bi"
+ }
+ },
+ {
+ "when": {
+ "straw": "pan",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_pan"
+ }
+ },
+ {
+ "when": {
+ "straw": "german",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_german"
+ }
+ },
+ {
+ "when": {
+ "straw": "omnisexual",
+ "facing": "north"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_omnisexual"
+ }
+ },
+
+
+ {
+ "when": {
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "south",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "south",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "south",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half_yellow",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "south",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full_yellow",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "2",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_full",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "1",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_half",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "citron",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemon_slice",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "orange",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/orange_slice",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "umbrella": "red_white",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_1",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "umbrella": "yellow_white",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_2",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "umbrella": "black_purple",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_3",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "umbrella": "orange_white",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_4",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "basic",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_basic",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "rainbow",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_rainbow",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "trans",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_trans",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "nonbinary",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_nonbinary",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "lesbian",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_lesbian",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "gay",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_gay",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "genderfluid",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_genderfluid",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "ace",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_ace",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "aro",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aro",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "aroace",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aroace",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "agender",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_agender",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "bi",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_bi",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "pan",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_pan",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "german",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_german",
+ "y": 180
+ }
+ },
+ {
+ "when": {
+ "straw": "omnisexual",
+ "facing": "south"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_omnisexual",
+ "y": 180
+ }
+ },
+
+
+ {
+ "when": {
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "east",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "east",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "east",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half_yellow",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "east",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full_yellow",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "2",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_full",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "1",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_half",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "citron",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemon_slice",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "orange",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/orange_slice",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "umbrella": "red_white",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_1",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "umbrella": "yellow_white",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_2",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "umbrella": "black_purple",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_3",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "umbrella": "orange_white",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_4",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "basic",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_basic",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "rainbow",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_rainbow",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "trans",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_trans",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "nonbinary",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_nonbinary",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "lesbian",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_lesbian",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "gay",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_gay",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "genderfluid",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_genderfluid",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "ace",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_ace",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "aro",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aro",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "aroace",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aroace",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "agender",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_agender",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "bi",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_bi",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "pan",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_pan",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "german",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_german",
+ "y": 90
+ }
+ },
+ {
+ "when": {
+ "straw": "omnisexual",
+ "facing": "east"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_omnisexual",
+ "y": 90
+ }
+ },
+
+
+ {
+ "when": {
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "west",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "west",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "drink_level": "1",
+ "facing": "west",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_half_yellow",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "drink_level": "2",
+ "facing": "west",
+ "fluid": "citron_lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_glass_fluid_full_yellow",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "2",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_full",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "has_ice": "true",
+ "drink_level": "1",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/ice_cube_half",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "citron",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemon_slice",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "fruit_slice": "orange",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/orange_slice",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "umbrella": "red_white",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_1",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "umbrella": "yellow_white",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_2",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "umbrella": "black_purple",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_3",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "umbrella": "orange_white",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/drink_umbrella_4",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "basic",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_basic",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "rainbow",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_rainbow",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "trans",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_trans",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "nonbinary",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_nonbinary",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "lesbian",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_lesbian",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "gay",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_gay",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "genderfluid",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_genderfluid",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "ace",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_ace",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "aro",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aro",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "aroace",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_aroace",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "agender",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_agender",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "bi",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_bi",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "pan",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_pan",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "german",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_german",
+ "y": 270
+ }
+ },
+ {
+ "when": {
+ "straw": "omnisexual",
+ "facing": "west"
+ },
+ "apply": {
+ "model": "lemonmates:block/straw_omnisexual",
+ "y": 270
+ }
}
- }
+ ]
}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/blockstates/terracotta_lemonade_jug.json b/src/main/resources/assets/lemonmates/blockstates/terracotta_lemonade_jug.json
new file mode 100644
index 0000000..5689864
--- /dev/null
+++ b/src/main/resources/assets/lemonmates/blockstates/terracotta_lemonade_jug.json
@@ -0,0 +1,81 @@
+{
+ "multipart": [
+ {
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_terracotta"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "1",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_1"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "2",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_2"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "3",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_3"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "4",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_4"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "5",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_5"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "6",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_6"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "7",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_7"
+ }
+ },
+ {
+ "when": {
+ "jug_level": "8",
+ "fluid": "lemonade"
+ },
+ "apply": {
+ "model": "lemonmates:block/lemonade_jug_fluid_8"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/models/block/ice_cube_full.json b/src/main/resources/assets/lemonmates/models/block/ice_cube_full.json
new file mode 100644
index 0000000..75ff90d
--- /dev/null
+++ b/src/main/resources/assets/lemonmates/models/block/ice_cube_full.json
@@ -0,0 +1,57 @@
+{
+ "format_version": "1.9.0",
+ "credit": "Made with Blockbench",
+ "textures": {
+ "0": "minecraft:block/ice",
+ "particle": "minecraft:block/ice"
+ },
+ "elements": [
+ {
+ "name": "ice_cube_1",
+ "from": [6.5, 5.75, 6.25],
+ "to": [7.75, 7, 7.5],
+ "rotation": {"angle": -22.5, "axis": "z", "origin": [7.5, 5.75, 8]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ },
+ {
+ "name": "ice_cube_3",
+ "from": [8.5, 5.17493, 6.2],
+ "to": [9.5, 6.17493, 7.2],
+ "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 5, 8]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ },
+ {
+ "name": "ice_cube_top",
+ "from": [8.25, 6, 7.25],
+ "to": [9.25, 7, 8.25],
+ "rotation": {"angle": -22.5, "axis": "y", "origin": [8.25, 6, 7.25]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ }
+ ],
+ "display": {
+ "head": {
+ "translation": [0, 14.5, 0]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/models/block/ice_cube_half.json b/src/main/resources/assets/lemonmates/models/block/ice_cube_half.json
new file mode 100644
index 0000000..523d281
--- /dev/null
+++ b/src/main/resources/assets/lemonmates/models/block/ice_cube_half.json
@@ -0,0 +1,85 @@
+{
+ "format_version": "1.9.0",
+ "credit": "Made with Blockbench",
+ "textures": {
+ "0": "minecraft:block/ice",
+ "particle": "minecraft:block/ice"
+ },
+ "elements": [
+ {
+ "name": "ice_cube_1",
+ "from": [6.5, 3.75, 6.25],
+ "to": [7.75, 5, 7.5],
+ "rotation": {"angle": -22.5, "axis": "z", "origin": [7.5, 3.75, 8]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ },
+ {
+ "name": "ice_cube_2",
+ "from": [6.75, 3.75, 9],
+ "to": [7.75, 4.75, 10],
+ "rotation": {"angle": -22.5, "axis": "y", "origin": [7.75, 3.75, 9.75]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ },
+ {
+ "name": "ice_cube_3",
+ "from": [8.5, 3.17493, 6.11575],
+ "to": [9.5, 4.17493, 7.11575],
+ "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 3, 8]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ },
+ {
+ "name": "ice_cube_top",
+ "from": [8.25, 4.5, 6.25],
+ "to": [9.25, 5.5, 7.25],
+ "rotation": {"angle": 22.5, "axis": "z", "origin": [8.25, 4.5, 6.25]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ },
+ {
+ "name": "ice_cube_4",
+ "from": [6.32401, 4.1124, 7.57769],
+ "to": [7.44901, 5.2374, 8.70269],
+ "rotation": {"angle": -45, "axis": "z", "origin": [6.44028, 4.22711, 0]},
+ "faces": {
+ "north": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "east": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "south": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "west": {"uv": [2, 0, 4, 2], "texture": "#0"},
+ "up": {"uv": [4, 2, 2, 0], "rotation": 90, "texture": "#0"},
+ "down": {"uv": [4, 0, 2, 2], "rotation": 270, "texture": "#0"}
+ }
+ }
+ ],
+ "display": {
+ "head": {
+ "translation": [0, 14.5, 0]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_full_yellow.json b/src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_full_yellow.json
new file mode 100644
index 0000000..be11598
--- /dev/null
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_full_yellow.json
@@ -0,0 +1,29 @@
+{
+ "format_version": "1.9.0",
+ "credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
+ "textures": {
+ "f0": "lemonmates:block/lemonade_glass_fluid_yellow",
+ "particle": "lemonmates:item/empty"
+ },
+ "elements": [
+ {
+ "name": "fluid",
+ "from": [6, 1, 6],
+ "to": [10, 6, 10],
+ "faces": {
+ "north": {"uv": [4, 0, 8, 3], "texture": "#f0"},
+ "east": {"uv": [4, 3, 8, 6], "texture": "#f0"},
+ "south": {"uv": [4, 6, 8, 9], "texture": "#f0"},
+ "west": {"uv": [0, 8, 4, 11], "texture": "#f0"},
+ "up": {"uv": [4, 4, 0, 0], "texture": "#f0"},
+ "down": {"uv": [4, 4, 0, 8], "texture": "#f0"}
+ }
+ }
+ ],
+ "display": {
+ "head": {
+ "translation": [0, 14.5, 0]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_half_yellow.json b/src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_half_yellow.json
new file mode 100644
index 0000000..6f66483
--- /dev/null
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_glass_fluid_half_yellow.json
@@ -0,0 +1,29 @@
+{
+ "format_version": "1.9.0",
+ "credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
+ "textures": {
+ "f1": "lemonmates:block/lemonade_glass_fluid_yellow",
+ "particle": "lemonmates:item/empty"
+ },
+ "elements": [
+ {
+ "name": "fluid",
+ "from": [6, 1, 6],
+ "to": [10, 4, 10],
+ "faces": {
+ "north": {"uv": [4, 0, 8, 3], "texture": "#f1"},
+ "east": {"uv": [4, 3, 8, 6], "texture": "#f1"},
+ "south": {"uv": [4, 6, 8, 9], "texture": "#f1"},
+ "west": {"uv": [0, 8, 4, 11], "texture": "#f1"},
+ "up": {"uv": [4, 4, 0, 0], "texture": "#f1"},
+ "down": {"uv": [4, 4, 0, 8], "texture": "#f1"}
+ }
+ }
+ ],
+ "display": {
+ "head": {
+ "translation": [0, 14.5, 0]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_1.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_1.json
index 7f88815..71133a3 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_1.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_1.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j1": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_2.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_2.json
index d6b0028..00aa36f 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_2.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_2.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j2": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_3.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_3.json
index 3ce85c0..bfa0ca9 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_3.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_3.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j3": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_4.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_4.json
index c1d3084..be85fff 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_4.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_4.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j4": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_5.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_5.json
index 9fe29e2..f6ab14e 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_5.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_5.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j5": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_6.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_6.json
index 97aba01..b01c306 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_6.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_6.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j6": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_7.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_7.json
index 66ac416..7e88d12 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_7.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_7.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "0": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j7": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_8.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_8.json
index 14917b1..a2bc804 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_8.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_fluid_8.json
@@ -1,9 +1,10 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:translucent",
"textures": {
- "j1": "item/lemonade_glass_fluid",
- "particle": "item/lemonade_glass_fluid"
+ "j8": "lemonmates:block/lemonade_glass_fluid",
+ "particle": "lemonmates:block/lemonade_glass_fluid"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_terracotta.json b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_terracotta.json
index cd64d3d..221f178 100644
--- a/src/main/resources/assets/lemonmates/models/block/lemonade_jug_terracotta.json
+++ b/src/main/resources/assets/lemonmates/models/block/lemonade_jug_terracotta.json
@@ -1,10 +1,11 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
+ "render_type": "minecraft:cutout",
"texture_size": [32, 32],
"textures": {
- "jc": "item/lemonade_jug_hardened_clay",
- "particle": "item/lemonade_jug_hardened_clay"
+ "jc": "lemonmates:item/lemonade_jug_hardened_clay",
+ "particle": "lemonmates:item/lemonade_jug_hardened_clay"
},
"elements": [
{
diff --git a/src/main/resources/assets/lemonmates/models/item/terracotta_lemonade_jug.json b/src/main/resources/assets/lemonmates/models/item/terracotta_lemonade_jug.json
new file mode 100644
index 0000000..536809a
--- /dev/null
+++ b/src/main/resources/assets/lemonmates/models/item/terracotta_lemonade_jug.json
@@ -0,0 +1,3 @@
+{
+ "parent": "lemonmates:block/lemonade_jug_terracotta"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/lemonmates/textures/item/lemonade_jug_hardened_clay.png b/src/main/resources/assets/lemonmates/textures/item/lemonade_jug_hardened_clay.png
new file mode 100644
index 0000000000000000000000000000000000000000..901353ad90453e12e0c684463ae00b59d723355c
GIT binary patch
literal 447
zcmV;w0YLtVP)Zluxfn&26Goz3ue
zK90fn$GeF-e?FhbkEe%e)!*W*nD*rGT}Y60!5~fa$oyB~Rl9iA6^~K)#|9|gN$MHl7SJ3*@Y%^jd{k2IrB
z^bBaF-U1X7y^U3j2DFcBhXVE#YUZJ@BI@4CMCBxj;B
z;GLju1BJz?iVqPVrHWPcs~vEczA~}18a~CC-{FRuvDsZ>n5dF#@AuAFmdxNa21^4G
z
Date: Thu, 28 May 2026 16:01:55 -0500
Subject: [PATCH 3/3] Fix crashes with jug
---
.../net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java | 2 +-
src/main/java/net/doppelr/lemonmates/item/ModJugItem.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java b/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java
index 436b6aa..4c55ce1 100644
--- a/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java
+++ b/src/main/java/net/doppelr/lemonmates/block/ModDrinkingGlassBlock.java
@@ -87,7 +87,7 @@ protected InteractionResult useWithoutItem(BlockState state, Level level, BlockP
protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) {
if (stack.getItem() instanceof ModJugItem jugItem && Boolean.TRUE.equals(stack.get(AllDataComponents.CAN_POUR))) {
if (state.getValue(DRINK_LEVEL) != 2) {
- if (stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) != null || stack.get(AllDataComponents.JUG_LEVEL) != 0) {
+ if (stack.get(AllDataComponents.APPLICABLE_FLUID_TO_CONTAINER) != null || (stack.get(AllDataComponents.JUG_LEVEL) != null && stack.get(AllDataComponents.JUG_LEVEL) != 0)) {
int newDrinkLevel = stack.get(AllDataComponents.JUG_LEVEL) > 0 ? 2 - state.getValue(DRINK_LEVEL) : 0;
if (stack.get(AllDataComponents.JUG_LEVEL) == 1 || state.getValue(DRINK_LEVEL) == 1)
newDrinkLevel = 1;
diff --git a/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java b/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
index baba71e..7568004 100644
--- a/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
+++ b/src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
@@ -89,7 +89,7 @@ public InteractionResult useOn(UseOnContext context) {
Level level = context.getLevel();
BlockPos pos = context.getClickedPos();
BlockState state = level.getBlockState(pos);
- if (stack.get(AllDataComponents.CAN_POUR) && state.getBlock() instanceof ModDrinkingGlassBlock)
+ if (stack.get(AllDataComponents.CAN_POUR) != null && stack.get(AllDataComponents.CAN_POUR) && state.getBlock() instanceof ModDrinkingGlassBlock)
return InteractionResult.SUCCESS;
return super.useOn(context);
}