2018-10-24 13:06:24 +02:00
|
|
|
package de.ellpeck.naturesaura.aura.container;
|
|
|
|
|
2018-11-07 23:42:13 +01:00
|
|
|
import de.ellpeck.naturesaura.aura.AuraType;
|
2018-10-24 13:06:24 +02:00
|
|
|
import de.ellpeck.naturesaura.aura.chunk.ISpotDrainable;
|
|
|
|
|
|
|
|
public class NaturalAuraContainer extends BasicAuraContainer implements ISpotDrainable {
|
|
|
|
|
|
|
|
private final int drainAmount;
|
|
|
|
|
2018-11-07 23:42:13 +01:00
|
|
|
public NaturalAuraContainer(AuraType type, int aura, int drainAmount) {
|
|
|
|
super(type, aura);
|
2018-10-24 13:06:24 +02:00
|
|
|
this.aura = aura;
|
|
|
|
this.drainAmount = drainAmount;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int storeAura(int amountToStore, boolean simulate) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int drainAuraPassively(int amountToDrain, boolean simulate) {
|
|
|
|
return this.drainAura(Math.min(this.drainAmount, amountToDrain), simulate);
|
|
|
|
}
|
|
|
|
}
|