-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
HexMod/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PlayerBasedCastEnv.java
Lines 69 to 77 in 532fe9a
| @Override | |
| protected double getCostModifier(PatternShapeMatch match) { | |
| ResourceLocation loc = actionKey(match); | |
| if (isOfTag(IXplatAbstractions.INSTANCE.getActionRegistry(), loc, HexTags.Actions.CANNOT_MODIFY_COST)) { | |
| return 1.0; | |
| } else { | |
| return this.caster.getAttributeValue(HexAttributes.MEDIA_CONSUMPTION_MODIFIER); | |
| } | |
| } |
HexMod/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java
Lines 206 to 220 in 532fe9a
| @Nullable | |
| protected ResourceLocation actionKey(PatternShapeMatch match) { | |
| ResourceLocation key; | |
| if (match instanceof PatternShapeMatch.Normal normal) { | |
| key = normal.key.location(); | |
| } else if (match instanceof PatternShapeMatch.PerWorld perWorld) { | |
| key = perWorld.key.location(); | |
| } else if (match instanceof PatternShapeMatch.Special special) { | |
| key = special.key.location(); | |
| } else { | |
| key = null; | |
| } | |
| return key; | |
| } | |
loc may null but there not check loc is null, result in throw a NullPointerException when draw an invaild pattern.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog