Apply editor cauldron recipes with native liquid consumption

This commit is contained in:
2026-09-08 22:43:03 +03:00
parent a82c2aa0f9
commit 43c3222fcb
5 changed files with 50 additions and 4 deletions
@@ -63,6 +63,9 @@ public final class AstraCauldron {
}
private void interact(PlayerInteractEvent.RightClickBlock event) {
if (pots == null || event.isCanceled() || event.getUseBlock() == TriState.FALSE || event.getUseItem() == TriState.FALSE) return;
if (event.getEntity() instanceof ServerPlayer player && EditorCauldronRecipes.interact(player, event.getPos(), event.getHand())) {
event.setCanceled(true); event.setCancellationResult(InteractionResult.SUCCESS); return;
}
if (event.getEntity() instanceof ServerPlayer player && ((!pots.contains(player.level(),event.getPos()) && liquids != null
&& liquids.interact(player,event.getPos(),event.getHand())) || pots.interact(player, event.getPos(), event.getHand()))) {
event.setCanceled(true); event.setCancellationResult(InteractionResult.SUCCESS);