diff --git a/src/main/java/de/ellpeck/naturesaura/InternalHooks.java b/src/main/java/de/ellpeck/naturesaura/InternalHooks.java index 0d82b1c7..606bc3d9 100644 --- a/src/main/java/de/ellpeck/naturesaura/InternalHooks.java +++ b/src/main/java/de/ellpeck/naturesaura/InternalHooks.java @@ -43,11 +43,10 @@ public class InternalHooks implements NaturesAuraAPI.IInternalHooks { if (!stack.isEmpty()) { var container = stack.getCapability(NaturesAuraAPI.capAuraContainer).orElse(null); if (extract) { - amount -= container.drainAura(amount, simulate); + return container.drainAura(amount, simulate) > 0; } else { - amount -= container.storeAura(amount, simulate); + return container.storeAura(amount, simulate) > 0; } - return amount <= 0; } return false; } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/BlockEntityNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/BlockEntityNatureAltar.java index cba1b03d..56ded84b 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/BlockEntityNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/BlockEntityNatureAltar.java @@ -48,10 +48,11 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable @Override protected boolean canExtract(ItemStack stack, int slot, int amount) { var cap = stack.getCapability(NaturesAuraAPI.capAuraContainer, null).orElse(null); - if (cap != null) + if (cap != null) { return cap.storeAura(1, true) <= 0; - else + } else { return BlockEntityNatureAltar.this.getRecipeForInput(stack) == null; + } } }; @OnlyIn(Dist.CLIENT)