Skip to content

Commit

Permalink
Another release :)
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Jun 26, 2024
1 parent 8659bd4 commit fc4a043
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
- Fixed being kicked from the server when opening the creative inventory while holding a complicated scroll.
- Fixed being able to crash the server with a fork-bomb-like spell.
- Made a few fixes to conjure water: (Thanks @Master_Bw3!)
- Fixed conjure water working in the nether.
- Fixed conjure water not working on waterloggable blocks.
- Fixed conjure water not working on cauldrons.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ publishMods {
displayName = "${property('mod_version')} for ${property('deps.minecraft')}"
version = project.version
changelog = getRootProject().file("CHANGELOG.md").text
type = STABLE
type = ALPHA
modLoaders.add("fabric")

def min = property('publish_target_min')
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps.yarn=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version=1.0.3
mod_version=1.0.4
maven_group=dev.enjarai.trickster
archives_base_name=trickster

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/dev/enjarai/trickster/spell/SpellContext.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.enjarai.trickster.spell;

import dev.enjarai.trickster.spell.tricks.blunder.BlunderException;
import dev.enjarai.trickster.spell.tricks.blunder.RecursionLimitReachedBlunder;
import dev.enjarai.trickster.spell.tricks.blunder.ExecutionLimitReachedBlunder;
import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
Expand All @@ -11,7 +11,7 @@
import java.util.*;

public abstract class SpellContext {
public static final int MAX_RECURSION_DEPTH = 1000;
public static final int MAX_RECURSION_DEPTH = 256;

private final Deque<List<Fragment>> partGlyphStack = new ArrayDeque<>();
private int recursions = 0;
Expand All @@ -22,13 +22,13 @@ public void pushPartGlyph(List<Fragment> fragments) throws BlunderException {
partGlyphStack.push(fragments);
recursions++;
if (recursions > MAX_RECURSION_DEPTH) {
throw new RecursionLimitReachedBlunder();
throw new ExecutionLimitReachedBlunder();
}
}

public void popPartGlyph() {
partGlyphStack.pop();
recursions--;
// recursions--; // For now, we'll actually have a maximum of 256 "function" calls in one spell execution, period.
}

public List<Fragment> peekPartGlyph() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import net.minecraft.text.MutableText;
import net.minecraft.text.Text;

public class RecursionLimitReachedBlunder extends BlunderException {
public class ExecutionLimitReachedBlunder extends BlunderException {
@Override
public MutableText createMessage() {
return Text.literal("Recursion limit reached");
return Text.literal("Execution limit reached");
}
}

0 comments on commit fc4a043

Please sign in to comment.