mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
parent
f5428adbc6
commit
5bf5b14fa8
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue