fixed enlightenment
This commit is contained in:
parent
97244cd461
commit
08e58c7342
1 changed files with 11 additions and 1 deletions
|
@ -24,6 +24,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static at.petrak.hexcasting.api.HexAPI.modLoc;
|
||||
|
||||
/**
|
||||
* Environment within which hexes are cast.
|
||||
* <p>
|
||||
|
@ -95,7 +97,15 @@ public abstract class CastingEnvironment {
|
|||
* Return whether this env can cast great spells.
|
||||
*/
|
||||
public boolean isEnlightened() {
|
||||
return false;
|
||||
var caster = this.getCaster();
|
||||
if (caster == null)
|
||||
return false;
|
||||
|
||||
var adv = this.world.getServer().getAdvancements().getAdvancement(modLoc("enlightenment"));
|
||||
if (adv == null)
|
||||
return false;
|
||||
|
||||
return caster.getAdvancements().getOrStartProgress(adv).isDone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue