Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

**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!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/doppelr/lemonmates/item/ModJugItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Loading