Apply editor cauldron recipes with native liquid consumption
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user