Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import at.petrak.hexcasting.api.casting.eval.env.CircleCastEnv;
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage;
import at.petrak.hexcasting.api.misc.Result;
import at.petrak.hexcasting.api.mod.HexConfig;
import at.petrak.hexcasting.api.pigment.FrozenPigment;
import at.petrak.hexcasting.api.utils.HexUtils;
import com.mojang.datafixers.util.Pair;
Expand Down Expand Up @@ -117,6 +118,10 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set<Bl
todo.add(Pair.of(out, herePos.relative(out)));
}
}
// Who would leave out the config limit? If this is forgotten, someone could make a Spell Circle the size of a world
if (seenGoodPosSet.size() >= HexConfig.server().maxSpellCircleLength()){
return new Result.Err<>(null);
}
}

if (seenGoodPositions.isEmpty()) {
Expand Down
Loading