Skip to content

Commit

Permalink
fix blood cauldron interactions
Browse files Browse the repository at this point in the history
address #657
  • Loading branch information
iron431 committed Nov 30, 2024
1 parent 4faee3a commit 695581c
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.gameevent.GameEvent;

import java.util.HashMap;
import java.util.Map;

public class BloodCauldronBlock extends LayeredCauldronBlock {

public BloodCauldronBlock() {
Expand Down Expand Up @@ -73,10 +70,10 @@ private static boolean isCauldronFull(BlockState blockState) {
}

public static CauldronInteraction.InteractionMap getInteractionMap() {
var map = CauldronInteraction.EMPTY.map();
var map = CauldronInteraction.newInteractionMap("blood_cauldron");

// Take Blood
map.put(Items.GLASS_BOTTLE, (blockState, level, blockPos, player, hand, itemStack) -> {
map.map().put(Items.GLASS_BOTTLE, (blockState, level, blockPos, player, hand, itemStack) -> {
if (!level.isClientSide) {
Item item = itemStack.getItem();
player.setItemInHand(hand, ItemUtils.createFilledResult(itemStack, player, new ItemStack(ItemRegistry.BLOOD_VIAL.get())));
Expand All @@ -90,7 +87,7 @@ public static CauldronInteraction.InteractionMap getInteractionMap() {
return ItemInteractionResult.sidedSuccess(level.isClientSide);
});

return new CauldronInteraction.InteractionMap("blood_cauldron_interactions", map);
return map;
}

public interface CookExecution {
Expand Down

0 comments on commit 695581c

Please sign in to comment.