Skip to content

Commit 117020f

Browse files
committed
Readded Slate Limit
1 parent 977ccba commit 117020f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import at.petrak.hexcasting.api.casting.eval.env.CircleCastEnv;
55
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage;
66
import at.petrak.hexcasting.api.misc.Result;
7+
import at.petrak.hexcasting.api.mod.HexConfig;
78
import at.petrak.hexcasting.api.pigment.FrozenPigment;
89
import at.petrak.hexcasting.api.utils.HexUtils;
910
import com.mojang.datafixers.util.Pair;
@@ -117,6 +118,10 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set<Bl
117118
todo.add(Pair.of(out, herePos.relative(out)));
118119
}
119120
}
121+
// Who would leave out the config limit? If this is forgotten, someone could make a Spell Circle the size of a world
122+
if (seenGoodPosSet.size() >= HexConfig.server().maxSpellCircleLength()){
123+
return new Result.Err<>(null);
124+
}
120125
}
121126

122127
if (seenGoodPositions.isEmpty()) {

0 commit comments

Comments
 (0)