use of hellfirepvp.astralsorcery.common.block.tile.fountain.BlockFountainPrime in project AstralSorcery by HellFirePvP.
the class TileFountain method updateFountainComponents.
private void updateFountainComponents() {
FountainEffect prevEffect = this.getCurrentEffect();
FountainEffect.EffectContext prevContext = this.effectContext;
BlockState primeState = world.getBlockState(pos.down());
if (primeState.getBlock() instanceof BlockFountainPrime) {
if (this.setCurrentEffect(((BlockFountainPrime) primeState.getBlock()).provideEffect()) && prevEffect != null) {
this.replaceCurrentEffect(prevEffect, prevContext, this.getCurrentEffect());
}
} else {
if (this.setCurrentEffect(null) && prevEffect != null) {
this.replaceCurrentEffect(prevEffect, prevContext, null);
}
}
}
Aggregations