From 471b7ad7e50b021379d93b495055094ecbd3b10b Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 23 Feb 2025 20:35:47 -0500 Subject: [PATCH 01/18] Fixed Spell Circle NBT-Storage leak --- .../casting/circles/CircleExecutionState.java | 67 +++++++++++-------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index f95fa84f01..c5b5f362b1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -29,33 +29,35 @@ */ public class CircleExecutionState { public static final String - TAG_IMPETUS_POS = "impetus_pos", - TAG_IMPETUS_DIR = "impetus_dir", - TAG_KNOWN_POSITIONS = "known_positions", - TAG_REACHED_POSITIONS = "reached_positions", - TAG_CURRENT_POS = "current_pos", - TAG_ENTERED_FROM = "entered_from", - TAG_IMAGE = "image", - TAG_CASTER = "caster", - TAG_PIGMENT = "pigment"; + TAG_IMPETUS_POS = "impetus_pos", + TAG_IMPETUS_DIR = "impetus_dir", + TAG_KNOWN_POSITIONS = "known_positions", + TAG_REACHED_POSITIONS = "reached_positions", + TAG_CURRENT_POS = "current_pos", + TAG_ENTERED_FROM = "entered_from", + TAG_IMAGE = "image", + TAG_CASTER = "caster", + TAG_PIGMENT = "pigment", + TAG_REACHED_NUMBER = "reached_slate"; public final BlockPos impetusPos; public final Direction impetusDir; // Does contain the starting impetus public final Set knownPositions; - public final List reachedPositions; + public final Set reachedPositions; public BlockPos currentPos; public Direction enteredFrom; public CastingImage currentImage; public @Nullable UUID caster; public @Nullable FrozenPigment casterPigment; + public Integer reachedNumber; public final AABB bounds; protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set knownPositions, - List reachedPositions, BlockPos currentPos, Direction enteredFrom, - CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment) { + Set reachedPositions, BlockPos currentPos, Direction enteredFrom, + CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, Integer reachedSlate) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; this.knownPositions = knownPositions; @@ -65,6 +67,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(this.knownPositions)); } @@ -83,7 +86,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set createNew(BlockEntityAbstractImpetus impetus, - @Nullable ServerPlayer caster) { + @Nullable ServerPlayer caster) { var level = (ServerLevel) impetus.getLevel(); if (level == null) @@ -129,7 +132,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(seenGoodPositions); - var reachedPositions = new ArrayList(); + var reachedPositions = new HashSet(); reachedPositions.add(impetus.getBlockPos()); var start = seenGoodPositions.get(0); @@ -142,8 +145,8 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set( - new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), knownPositions, - reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer)); + new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), knownPositions, + reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0)); } public CompoundTag save() { @@ -173,7 +176,7 @@ public CompoundTag save() { if (this.casterPigment != null) out.put(TAG_PIGMENT, this.casterPigment.serializeToNBT()); - + out.putInt(TAG_REACHED_NUMBER, this.reachedNumber); return out; } @@ -186,7 +189,7 @@ public static CircleExecutionState load(CompoundTag nbt, ServerLevel world) { for (var tag : knownTag) { knownPositions.add(NbtUtils.readBlockPos(HexUtils.downcast(tag, CompoundTag.TYPE))); } - var reachedPositions = new ArrayList(); + var reachedPositions = new HashSet(); var reachedTag = nbt.getList(TAG_REACHED_POSITIONS, Tag.TAG_COMPOUND); for (var tag : reachedTag) { reachedPositions.add(NbtUtils.readBlockPos(HexUtils.downcast(tag, CompoundTag.TYPE))); @@ -204,8 +207,13 @@ public static CircleExecutionState load(CompoundTag nbt, ServerLevel world) { if (nbt.contains(TAG_PIGMENT, Tag.TAG_COMPOUND)) pigment = FrozenPigment.fromNBT(nbt.getCompound(TAG_PIGMENT)); + int reachedNumber = 0; + if (nbt.contains(TAG_REACHED_NUMBER, Tag.TAG_INT)) { + reachedNumber = nbt.getInt(TAG_REACHED_NUMBER); + } + return new CircleExecutionState(startPos, startDir, knownPositions, reachedPositions, currentPos, - enteredFrom, image, caster, pigment); + enteredFrom, image, caster, pigment, reachedNumber); } /** @@ -225,17 +233,18 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { if (!(executorBlockState.getBlock() instanceof ICircleComponent executor)) { // TODO: notification of the error? ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), false); + Objects.requireNonNull(env.getImpetus()), false); return false; } executorBlockState = executor.startEnergized(this.currentPos, executorBlockState, world); this.reachedPositions.add(this.currentPos); + this.reachedNumber = this.reachedNumber +1; // Do the execution! boolean halt = false; var ctrl = executor.acceptControlFlow(this.currentImage, env, this.enteredFrom, this.currentPos, - executorBlockState, world); + executorBlockState, world); if (env.getImpetus() == null) return false; //the impetus got removed during the cast and no longer exists in the world. stop casting @@ -249,15 +258,15 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { for (var exit : cont.exits) { var there = world.getBlockState(exit.getFirst()); if (there.getBlock() instanceof ICircleComponent cc - && cc.canEnterFromDirection(exit.getSecond(), exit.getFirst(), there, world)) { + && cc.canEnterFromDirection(exit.getSecond(), exit.getFirst(), there, world)) { if (found != null) { // oh no! impetus.postDisplay( - Component.translatable("hexcasting.tooltip.circle.many_exits", - Component.literal(this.currentPos.toShortString()).withStyle(ChatFormatting.RED)), - new ItemStack(Items.COMPASS)); + Component.translatable("hexcasting.tooltip.circle.many_exits", + Component.literal(this.currentPos.toShortString()).withStyle(ChatFormatting.RED)), + new ItemStack(Items.COMPASS)); ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), false); + Objects.requireNonNull(env.getImpetus()), false); halt = true; break; } else { @@ -269,13 +278,13 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { if (found == null) { // will never enter here if there were too many because found will have been set ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), false); + Objects.requireNonNull(env.getImpetus()), false); impetus.postNoExits(this.currentPos); halt = true; } else { // A single valid exit position has been found. ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), true); + Objects.requireNonNull(env.getImpetus()), true); currentPos = found.getFirst(); enteredFrom = found.getSecond(); currentImage = cont.update.withOverriddenUsedOps(0); // reset ops used after each slate finishes executing @@ -289,7 +298,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { * How many ticks should pass between activations, given the number of blocks encountered so far. */ protected int getTickSpeed() { - return Math.max(2, 10 - (this.reachedPositions.size() - 1) / 3); + return Math.max(2, 10 - (this.reachedNumber - 1) / 3); } public void endExecution(BlockEntityAbstractImpetus impetus) { From 841e64475b17df271463615ad84d0d60f2693a9c Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 23 Feb 2025 20:38:10 -0500 Subject: [PATCH 02/18] Cleaned code up from Spell Circle NBT-Fix --- .../casting/circles/CircleExecutionState.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index c5b5f362b1..76385c6c99 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -29,22 +29,22 @@ */ public class CircleExecutionState { public static final String - TAG_IMPETUS_POS = "impetus_pos", - TAG_IMPETUS_DIR = "impetus_dir", - TAG_KNOWN_POSITIONS = "known_positions", - TAG_REACHED_POSITIONS = "reached_positions", - TAG_CURRENT_POS = "current_pos", - TAG_ENTERED_FROM = "entered_from", - TAG_IMAGE = "image", - TAG_CASTER = "caster", - TAG_PIGMENT = "pigment", - TAG_REACHED_NUMBER = "reached_slate"; + TAG_IMPETUS_POS = "impetus_pos", + TAG_IMPETUS_DIR = "impetus_dir", + TAG_KNOWN_POSITIONS = "known_positions", + TAG_REACHED_POSITIONS = "reached_positions", + TAG_CURRENT_POS = "current_pos", + TAG_ENTERED_FROM = "entered_from", + TAG_IMAGE = "image", + TAG_CASTER = "caster", + TAG_PIGMENT = "pigment", + TAG_REACHED_NUMBER = "reached_slate"; public final BlockPos impetusPos; public final Direction impetusDir; // Does contain the starting impetus public final Set knownPositions; - public final Set reachedPositions; + public final HashSet reachedPositions; public BlockPos currentPos; public Direction enteredFrom; public CastingImage currentImage; @@ -56,7 +56,7 @@ public class CircleExecutionState { protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set knownPositions, - Set reachedPositions, BlockPos currentPos, Direction enteredFrom, + HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, Integer reachedSlate) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; From bc64650f32e0b74c9dc53ad180f3c4fd3864ad3d Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 23 Feb 2025 21:12:18 -0500 Subject: [PATCH 03/18] Why did IDEA indent so much? --- .../casting/circles/CircleExecutionState.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 76385c6c99..81eead9e6a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -56,8 +56,8 @@ public class CircleExecutionState { protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set knownPositions, - HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, - CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, Integer reachedSlate) { + HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, + CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, Integer reachedSlate) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; this.knownPositions = knownPositions; @@ -86,7 +86,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set createNew(BlockEntityAbstractImpetus impetus, - @Nullable ServerPlayer caster) { + @Nullable ServerPlayer caster) { var level = (ServerLevel) impetus.getLevel(); if (level == null) @@ -145,8 +145,8 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set( - new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), knownPositions, - reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0)); + new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), knownPositions, + reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0)); } public CompoundTag save() { @@ -213,7 +213,7 @@ public static CircleExecutionState load(CompoundTag nbt, ServerLevel world) { } return new CircleExecutionState(startPos, startDir, knownPositions, reachedPositions, currentPos, - enteredFrom, image, caster, pigment, reachedNumber); + enteredFrom, image, caster, pigment, reachedNumber); } /** @@ -233,7 +233,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { if (!(executorBlockState.getBlock() instanceof ICircleComponent executor)) { // TODO: notification of the error? ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), false); + Objects.requireNonNull(env.getImpetus()), false); return false; } @@ -244,7 +244,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { // Do the execution! boolean halt = false; var ctrl = executor.acceptControlFlow(this.currentImage, env, this.enteredFrom, this.currentPos, - executorBlockState, world); + executorBlockState, world); if (env.getImpetus() == null) return false; //the impetus got removed during the cast and no longer exists in the world. stop casting @@ -258,13 +258,13 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { for (var exit : cont.exits) { var there = world.getBlockState(exit.getFirst()); if (there.getBlock() instanceof ICircleComponent cc - && cc.canEnterFromDirection(exit.getSecond(), exit.getFirst(), there, world)) { + && cc.canEnterFromDirection(exit.getSecond(), exit.getFirst(), there, world)) { if (found != null) { // oh no! impetus.postDisplay( - Component.translatable("hexcasting.tooltip.circle.many_exits", - Component.literal(this.currentPos.toShortString()).withStyle(ChatFormatting.RED)), - new ItemStack(Items.COMPASS)); + Component.translatable("hexcasting.tooltip.circle.many_exits", + Component.literal(this.currentPos.toShortString()).withStyle(ChatFormatting.RED)), + new ItemStack(Items.COMPASS)); ICircleComponent.sfx(this.currentPos, executorBlockState, world, Objects.requireNonNull(env.getImpetus()), false); halt = true; @@ -278,13 +278,13 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { if (found == null) { // will never enter here if there were too many because found will have been set ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), false); + Objects.requireNonNull(env.getImpetus()), false); impetus.postNoExits(this.currentPos); halt = true; } else { // A single valid exit position has been found. ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), true); + Objects.requireNonNull(env.getImpetus()), true); currentPos = found.getFirst(); enteredFrom = found.getSecond(); currentImage = cont.update.withOverriddenUsedOps(0); // reset ops used after each slate finishes executing From 3c08dfc8d9da78dce1bb8b4a4fc23f813d6206f6 Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 23 Feb 2025 23:53:56 -0500 Subject: [PATCH 04/18] Notes:tm: --- .../api/casting/circles/CircleExecutionState.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 81eead9e6a..7f14934846 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -100,6 +100,19 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(); while (!todo.isEmpty()) { + // Sophia/Stickia here! + // This block of code works well enough, it gets all the ICircleComponent that it can. However, + // this tries to do all the calculating in a single tick, so it can get *really* laggy for larger circles. + // So, this `while` would likely need to be moved into the #tick method, so it can be spread out over time during start up. + // Why are these comments here? Likely so Sophia can remember this for after she gets sleep, or if anyone + // else wants to take up the challenge. As for her system will work, but not be clean lmao + + // As brought up by Chloe, the slates *could* change during start up. + // Meaning someone could just place/remove slate at the same rate of discovery, and have World Ambit for no slate + // cost and generally cheating the system. What would be best would be (somehow) getting the block slate + // without loading the chunk its self, meaning servers wont have to handle 1000s of chunks being loaded at once + // and players not cheating the system. + // But this is easier said than done. var pair = todo.pop(); var enterDir = pair.getFirst(); var herePos = pair.getSecond(); From 70c0180340baeeefe941aad3d899185a6ebf16aa Mon Sep 17 00:00:00 2001 From: Stickia Date: Mon, 24 Feb 2025 11:45:19 -0500 Subject: [PATCH 05/18] Added some Null safety to reachedNumber --- .../api/casting/circles/CircleExecutionState.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 7f14934846..5e67d44a0c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -50,6 +50,7 @@ public class CircleExecutionState { public CastingImage currentImage; public @Nullable UUID caster; public @Nullable FrozenPigment casterPigment; + // This controls the speed of the current slate public Integer reachedNumber; public final AABB bounds; @@ -57,7 +58,7 @@ public class CircleExecutionState { protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set knownPositions, HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, - CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, Integer reachedSlate) { + CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, @Nullable Integer reachedNumber) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; this.knownPositions = knownPositions; @@ -67,7 +68,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(this.knownPositions)); } @@ -189,7 +190,9 @@ public CompoundTag save() { if (this.casterPigment != null) out.put(TAG_PIGMENT, this.casterPigment.serializeToNBT()); - out.putInt(TAG_REACHED_NUMBER, this.reachedNumber); + + if (this.reachedNumber != null) + out.putInt(TAG_REACHED_NUMBER, this.reachedNumber); return out; } From faee92090d800e87ffa57dbb69f49ba27b33ac9b Mon Sep 17 00:00:00 2001 From: Stickia Date: Thu, 19 Jun 2025 20:37:54 -0400 Subject: [PATCH 06/18] Removed the Chest Inv stuff Made `reachedNumber` into `reachedSlate`and made it a long --- .../casting/circles/CircleExecutionState.java | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 5e67d44a0c..35e764c7cc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -51,14 +51,14 @@ public class CircleExecutionState { public @Nullable UUID caster; public @Nullable FrozenPigment casterPigment; // This controls the speed of the current slate - public Integer reachedNumber; + public Long reachedSlate; public final AABB bounds; protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set knownPositions, HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, - CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, @Nullable Integer reachedNumber) { + CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, @Nullable Long reachedSlate) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; this.knownPositions = knownPositions; @@ -68,7 +68,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(this.knownPositions)); } @@ -101,19 +101,22 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(); while (!todo.isEmpty()) { - // Sophia/Stickia here! - // This block of code works well enough, it gets all the ICircleComponent that it can. However, - // this tries to do all the calculating in a single tick, so it can get *really* laggy for larger circles. - // So, this `while` would likely need to be moved into the #tick method, so it can be spread out over time during start up. - // Why are these comments here? Likely so Sophia can remember this for after she gets sleep, or if anyone - // else wants to take up the challenge. As for her system will work, but not be clean lmao - - // As brought up by Chloe, the slates *could* change during start up. - // Meaning someone could just place/remove slate at the same rate of discovery, and have World Ambit for no slate - // cost and generally cheating the system. What would be best would be (somehow) getting the block slate - // without loading the chunk its self, meaning servers wont have to handle 1000s of chunks being loaded at once - // and players not cheating the system. - // But this is easier said than done. + /* + Sophia/Stickia here! + This block of code works well enough, it gets all the ICircleComponent that it can. However, + this tries to do all the calculating in a single tick, so it can get *really* laggy for larger circles. + So, this `while` would likely need to be moved into the #tick method, so it can be spread out over time during start up. + Why are these comments here? Likely so Sophia can remember this for after she gets sleep, or if anyone + else wants to take up the challenge. As for her system will work, but not be clean lmao + + As brought up by Chloe, the slates *could* change during start up. + Meaning someone could just place/remove slate at the same rate of discovery, and have World Ambit for almost no slate + cost and generally cheating the system. What would be best would be (somehow) getting the block slate + without loading the chunk its self, meaning servers wont have to handle 1000s of chunks being loaded at once + and players not cheating the system. + But this is easier said than done. + */ + var pair = todo.pop(); var enterDir = pair.getFirst(); var herePos = pair.getSecond(); @@ -160,7 +163,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set( new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), knownPositions, - reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0)); + reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0L)); } public CompoundTag save() { @@ -191,8 +194,7 @@ public CompoundTag save() { if (this.casterPigment != null) out.put(TAG_PIGMENT, this.casterPigment.serializeToNBT()); - if (this.reachedNumber != null) - out.putInt(TAG_REACHED_NUMBER, this.reachedNumber); + out.putLong(TAG_REACHED_NUMBER, this.reachedSlate); return out; } @@ -223,9 +225,9 @@ public static CircleExecutionState load(CompoundTag nbt, ServerLevel world) { if (nbt.contains(TAG_PIGMENT, Tag.TAG_COMPOUND)) pigment = FrozenPigment.fromNBT(nbt.getCompound(TAG_PIGMENT)); - int reachedNumber = 0; - if (nbt.contains(TAG_REACHED_NUMBER, Tag.TAG_INT)) { - reachedNumber = nbt.getInt(TAG_REACHED_NUMBER); + long reachedNumber = 0; + if (nbt.contains(TAG_REACHED_NUMBER, Tag.TAG_LONG)){ + reachedNumber = nbt.getLong(TAG_REACHED_NUMBER); } return new CircleExecutionState(startPos, startDir, knownPositions, reachedPositions, currentPos, @@ -255,7 +257,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { executorBlockState = executor.startEnergized(this.currentPos, executorBlockState, world); this.reachedPositions.add(this.currentPos); - this.reachedNumber = this.reachedNumber +1; + this.reachedSlate = this.reachedSlate +1; // Do the execution! boolean halt = false; @@ -314,7 +316,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { * How many ticks should pass between activations, given the number of blocks encountered so far. */ protected int getTickSpeed() { - return Math.max(2, 10 - (this.reachedNumber - 1) / 3); + return Math.toIntExact(Math.max(2, 10 - (this.reachedSlate - 1) / 3)); } public void endExecution(BlockEntityAbstractImpetus impetus) { From c48579275782eb66a7ec98cfd048152daf4c96ef Mon Sep 17 00:00:00 2001 From: Stickia Date: Thu, 19 Jun 2025 21:00:52 -0400 Subject: [PATCH 07/18] re add the .cache --- .../19f2b40f78e342d65a8cb499a41e3fcb2eadaca3 | 58 ----- .../2ba8da2cf2d44ff18dc72cc891b094eca6836a5c | 25 -- .../3cb4ab563deee432e7d307024048f57946bafb1c | 4 - .../812fdb58b7018b2d5c5af7da57a2b1857fa66794 | 34 --- .../c70ef2fe5da52437c1f53bcc9ea0e416f16bcc0b | 220 ------------------ 5 files changed, 341 deletions(-) delete mode 100644 Fabric/src/generated/resources/.cache/19f2b40f78e342d65a8cb499a41e3fcb2eadaca3 delete mode 100644 Fabric/src/generated/resources/.cache/2ba8da2cf2d44ff18dc72cc891b094eca6836a5c delete mode 100644 Fabric/src/generated/resources/.cache/3cb4ab563deee432e7d307024048f57946bafb1c delete mode 100644 Fabric/src/generated/resources/.cache/812fdb58b7018b2d5c5af7da57a2b1857fa66794 delete mode 100644 Fabric/src/generated/resources/.cache/c70ef2fe5da52437c1f53bcc9ea0e416f16bcc0b diff --git a/Fabric/src/generated/resources/.cache/19f2b40f78e342d65a8cb499a41e3fcb2eadaca3 b/Fabric/src/generated/resources/.cache/19f2b40f78e342d65a8cb499a41e3fcb2eadaca3 deleted file mode 100644 index a2a95b576a..0000000000 --- a/Fabric/src/generated/resources/.cache/19f2b40f78e342d65a8cb499a41e3fcb2eadaca3 +++ /dev/null @@ -1,58 +0,0 @@ -// 1.20.1 2025-01-23T15:50:44.3944222 Hex Casting/Loot Tables -4efd95d408d050c36ff21b18f3c37116491fef92 data\hexcasting\loot_tables\blocks\directrix\redstone.json -c81a5cb81141ab1fe09dd5dd3a0968b69dfffbd7 data\hexcasting\loot_tables\blocks\stripped_edified_log.json -a62ffbcec2aa40172e05cd9fcd8e70e295d008e9 data\hexcasting\loot_tables\blocks\edified_fence_gate.json -8ea8fd68719a960c2e132df441564a70c0e376a8 data\hexcasting\loot_tables\blocks\amethyst_pillar.json -9905b767be7849e02a8e4ec4170af1bdde4e7fab data\hexcasting\loot_tables\blocks\edified_stairs.json -0b734693c926045b60fb515814b7a6695d0295fc data\hexcasting\loot_tables\blocks\impetus\look.json -ab86e126a704550d3f21c0b43f99fdc2665e4b09 data\hexcasting\loot_tables\blocks\slate_amethyst_tiles.json -2c9af74a82ca462e5986354966d5a0a1fd5a2083 data\hexcasting\loot_tables\blocks\slate_tiles.json -bedbc2bd04f79372aedea64214ba2ea49cde9640 data\hexcasting\loot_tables\blocks\amethyst_edified_leaves.json -45dc91d820caa5c421fe6f2afc7f71e45d6acd4d data\hexcasting\loot_tables\blocks\slate_pillar.json -6c35afda4ca349f3506fe08f86f0afe58a6f2c44 data\hexcasting\loot_tables\blocks\quenched_allay.json -2902c4dae60875a1b2daf0a948a49a3419d8ec9d data\hexcasting\loot_tables\blocks\edified_log.json -95be0cf7f277257671631929462131b6d611119a data\hexcasting\loot_tables\inject\amethyst_cluster.json -b19ac49146149555038e6d2e06200d514df1ef43 data\hexcasting\loot_tables\blocks\akashic_bookshelf.json -c426245d51f1e0fa0db7c4bfb454284d75506c9c data\hexcasting\loot_tables\blocks\quenched_allay_bricks.json -6920654f50532b5e557646e34edc4872339eb79f data\hexcasting\loot_tables\blocks\edified_log_amethyst.json -6eecc98b606d7ea5ec6f4c1fa4f63f7c1eba9223 data\hexcasting\loot_tables\blocks\slate_amethyst_bricks.json -2ad288784b0dc106ace2e6e0a40669f83476c414 data\hexcasting\loot_tables\blocks\slate.json -49940d1cb2599212e2837d7ed66c6c66e54f80f8 data\hexcasting\loot_tables\blocks\akashic_record.json -d16fa9e366d48646686470c2d1f9bda4db3a1afa data\hexcasting\loot_tables\blocks\ancient_scroll_paper.json -cc7313cc33609fe1120baa7b4db631eaa29fbba1 data\hexcasting\loot_tables\blocks\citrine_edified_leaves.json -df5496da8e48b61a171bc7a3936495c016cc002e data\hexcasting\loot_tables\blocks\directrix\empty.json -92528799c8ee13ff26c3c505e4dfb286c30f97c7 data\hexcasting\loot_tables\blocks\akashic_connector.json -434c2a6d2645e56e9a6ca56249ffa84645558e3b data\hexcasting\loot_tables\blocks\quenched_allay_bricks_small.json -601384d888edab27efe4a33027bb557eb7cb6ca2 data\hexcasting\loot_tables\blocks\edified_log_purple.json -45ae0ec668a07aa5b33d491377b2978f69f9f019 data\hexcasting\loot_tables\blocks\edified_panel.json -55f265961463a89c243ec8ac1970c70185f064a6 data\hexcasting\loot_tables\blocks\edified_button.json -7123b1a0469d7bd5bf8a2772182d222bf354df1a data\hexcasting\loot_tables\blocks\slate_bricks_small.json -509ecbb9731e75b63638c6012b2f986f131fd42f data\hexcasting\loot_tables\blocks\slate_amethyst_bricks_small.json -74159c21634679a6ab1dde1c181433db8b31c6ae data\hexcasting\loot_tables\blocks\edified_log_citrine.json -1dd4268edf7d6fa247013ab45541c7bfb915eef8 data\hexcasting\loot_tables\blocks\amethyst_bricks_small.json -499af9f15cf0a7f16fd2939e5d3af60a8089cc3e data\hexcasting\loot_tables\blocks\slate_bricks.json -30f06db8c1ea74c9f4d95474e412336d065ac888 data\hexcasting\loot_tables\blocks\edified_door.json -7c9c94d5b6b570d25eff32d4fa2ecc1e842e5231 data\hexcasting\loot_tables\blocks\quenched_allay_tiles.json -65fe724d4c4ba8b0ab7d7a11bf37687413d9119d data\hexcasting\loot_tables\blocks\edified_fence.json -cf6ff1ed1ee6fdbb05af16468a0a0ced79ac334e data\hexcasting\loot_tables\blocks\amethyst_bricks.json -8c6c0486170537d73b923a2b9f83722107fc8716 data\hexcasting\loot_tables\blocks\edified_log_aventurine.json -dc4c6d270b8e93d05ac8ddeb1b9dd1d64828ac5d data\hexcasting\loot_tables\blocks\stripped_edified_wood.json -2ab674e834184b4e17dc002556d4473cac137445 data\hexcasting\loot_tables\blocks\edified_slab.json -e6ff979aa47877c1b807075c448defd249cd3484 data\hexcasting\loot_tables\blocks\slate_amethyst_pillar.json -9ff760d5db5628328ea9274c98e18a08f1ab983e data\hexcasting\loot_tables\blocks\slate_block.json -f1145860d80ff053970b1ad4f3b2f5d9f28e7c73 data\hexcasting\loot_tables\blocks\directrix\boolean.json -44658abcf122575878834d276ebcf5d8a6b7b398 data\hexcasting\loot_tables\blocks\aventurine_edified_leaves.json -849afa706e7479d1c11bb40ae223ae5833e71286 data\hexcasting\loot_tables\blocks\scroll_paper_lantern.json -b6c23fdde4f2c22c81f008604d5ff1c32ca8eb61 data\hexcasting\loot_tables\blocks\amethyst_tiles.json -10cb1b94596ac7131efe3bd5c36c1543ddba9302 data\hexcasting\loot_tables\blocks\impetus\redstone.json -147e0739a712a9050856cebcad1757b3f418f647 data\hexcasting\loot_tables\blocks\edified_trapdoor.json -5f8d09e8c759d05cf9c2265ae28ea942cfbbe2be data\hexcasting\loot_tables\blocks\edified_pressure_plate.json -ecaeb4d5703a7aa206627ed38ee71aeb7e93d688 data\hexcasting\loot_tables\blocks\impetus\rightclick.json -a4e0194d8966a24531e43e04437cdb2a96456898 data\hexcasting\loot_tables\blocks\edified_tile.json -1a1236e54c24b5aeff05919c73c76151da2cf115 data\hexcasting\loot_tables\blocks\amethyst_sconce.json -c15d3ced89c882dfe552f84435fcdd560b729567 data\hexcasting\loot_tables\blocks\scroll_paper.json -92331eb19422730ffda0a3e52427a75aa1f7aff2 data\hexcasting\loot_tables\blocks\ancient_scroll_paper_lantern.json -b706c8a064f717c57104c48ea42aa860b45cf7a4 data\hexcasting\loot_tables\blocks\amethyst_dust_block.json -2ac70e3c3600c88b2544d9755fc634216a7a523c data\hexcasting\loot_tables\blocks\edified_wood.json -1c6b077aae560e780be29e74ddcd4b0ca10ce3cf data\hexcasting\loot_tables\blocks\impetus\empty.json -847bc3ead8a88a8f210a24e7732c28d50aa2f5dc data\hexcasting\loot_tables\blocks\edified_planks.json diff --git a/Fabric/src/generated/resources/.cache/2ba8da2cf2d44ff18dc72cc891b094eca6836a5c b/Fabric/src/generated/resources/.cache/2ba8da2cf2d44ff18dc72cc891b094eca6836a5c deleted file mode 100644 index 0e1d57cba2..0000000000 --- a/Fabric/src/generated/resources/.cache/2ba8da2cf2d44ff18dc72cc891b094eca6836a5c +++ /dev/null @@ -1,25 +0,0 @@ -// 1.20.1 2025-01-23T15:50:44.4049409 Hex Casting/Tags for minecraft:item -e5df19a1dc6eadf14cd9b0f0fe45a74330b745e9 data\minecraft\tags\items\planks.json -c562b4be24d0b6b13f3c65599d3bfa3bf2c4ce21 data\minecraft\tags\items\logs.json -20183cd61968ff6548df2dde1100b6378d68d64b data\minecraft\tags\items\wooden_buttons.json -5bbfd513fd2eb2090b0c2d1ec33504deb79d53b9 data\minecraft\tags\items\slabs.json -ef8ae066fea6277ba2ab43faf18757b88f7c4803 data\hexcasting\tags\items\grants_root_advancement.json -e5df19a1dc6eadf14cd9b0f0fe45a74330b745e9 data\hexcasting\tags\items\edified_planks.json -fdb48f194d7937ab6b423fa4b90a4d438bf6dd90 data\minecraft\tags\items\wooden_doors.json -4461ef6db41a675fd077dd833cfd0ea537e755be data\c\tags\items\amethyst_dusts.json -38d781b60c5c37dc025d4c7e9ec5aa680f2a5835 data\c\tags\items\gems.json -c562b4be24d0b6b13f3c65599d3bfa3bf2c4ce21 data\hexcasting\tags\items\edified_logs.json -c72a147bc65d26424df199388969ebd11119aed3 data\hexcasting\tags\items\brainswept_circle_components.json -30780136e6469a01369d7e278998edb6d7f6a16b data\hexcasting\tags\items\staves.json -5bbfd513fd2eb2090b0c2d1ec33504deb79d53b9 data\minecraft\tags\items\wooden_slabs.json -5216ba5c57db29b8dee9aebc63a2e3b17c97dc17 data\minecraft\tags\items\wooden_trapdoors.json -9d18fb7a889031a704ca0e553600e1d6f8c3759d data\hexcasting\tags\items\directrices.json -e186f43ed06770e698c886691f91b2c6acdb5a2a data\hexcasting\tags\items\seal_materials.json -5928bad07d3872bb60f29ef4f3c885c8e1967c20 data\hexcasting\tags\items\phial_base.json -fdb48f194d7937ab6b423fa4b90a4d438bf6dd90 data\minecraft\tags\items\doors.json -37cff4ce449b8069b59b2327d78e073fc026d348 data\minecraft\tags\items\wooden_pressure_plates.json -bdb90cee0e88e02f0b98f12d5dd212adfaca9afd data\hexcasting\tags\items\impeti.json -20183cd61968ff6548df2dde1100b6378d68d64b data\minecraft\tags\items\buttons.json -5f3b600b4fd98744bd08c993ce7bcb9c2f195cd2 data\minecraft\tags\items\leaves.json -5216ba5c57db29b8dee9aebc63a2e3b17c97dc17 data\minecraft\tags\items\trapdoors.json -c562b4be24d0b6b13f3c65599d3bfa3bf2c4ce21 data\minecraft\tags\items\logs_that_burn.json diff --git a/Fabric/src/generated/resources/.cache/3cb4ab563deee432e7d307024048f57946bafb1c b/Fabric/src/generated/resources/.cache/3cb4ab563deee432e7d307024048f57946bafb1c deleted file mode 100644 index c7442d4c4d..0000000000 --- a/Fabric/src/generated/resources/.cache/3cb4ab563deee432e7d307024048f57946bafb1c +++ /dev/null @@ -1,4 +0,0 @@ -// 1.20.1 2025-01-23T15:50:44.4152906 Hex Casting/Tags for hexcasting:action -6fe30f41e2bcd48589caab26d210a513dce1ab7c data\hexcasting\tags\action\per_world_pattern.json -6fe30f41e2bcd48589caab26d210a513dce1ab7c data\hexcasting\tags\action\can_start_enlighten.json -6fe30f41e2bcd48589caab26d210a513dce1ab7c data\hexcasting\tags\action\requires_enlightenment.json diff --git a/Fabric/src/generated/resources/.cache/812fdb58b7018b2d5c5af7da57a2b1857fa66794 b/Fabric/src/generated/resources/.cache/812fdb58b7018b2d5c5af7da57a2b1857fa66794 deleted file mode 100644 index 657625c00a..0000000000 --- a/Fabric/src/generated/resources/.cache/812fdb58b7018b2d5c5af7da57a2b1857fa66794 +++ /dev/null @@ -1,34 +0,0 @@ -// 1.20.1 2025-01-23T15:50:44.400399 Hex Casting/Tags for minecraft:block -e8d5ef7eabb567228b279b2419e4f042082d7491 data\minecraft\tags\blocks\fences.json -7e1e353cb7f561f086898f991ece48e047991934 data\minecraft\tags\blocks\fence_gates.json -fdb48f194d7937ab6b423fa4b90a4d438bf6dd90 data\minecraft\tags\blocks\doors.json -c72a147bc65d26424df199388969ebd11119aed3 data\hexcasting\tags\blocks\brainswept_circle_components.json -5f3b600b4fd98744bd08c993ce7bcb9c2f195cd2 data\minecraft\tags\blocks\leaves.json -bdb90cee0e88e02f0b98f12d5dd212adfaca9afd data\hexcasting\tags\blocks\impeti.json -37cff4ce449b8069b59b2327d78e073fc026d348 data\minecraft\tags\blocks\pressure_plates.json -8cd7a960fd719f200b0bf38100cd17c73b66d39c data\minecraft\tags\blocks\mineable\pickaxe.json -c562b4be24d0b6b13f3c65599d3bfa3bf2c4ce21 data\minecraft\tags\blocks\logs_that_burn.json -357eddf3cee6f16725bed0701d57b2ca3097d74d data\minecraft\tags\blocks\mineable\shovel.json -4b84fc8b7976df220be382bdda66ecf25ceee559 data\create\tags\blocks\brittle.json -5bbfd513fd2eb2090b0c2d1ec33504deb79d53b9 data\minecraft\tags\blocks\slabs.json -7acae0c88f5ead65339db1b11b16f60214434c86 data\minecraft\tags\blocks\wooden_fences.json -281cb08b9b68ef049820c4f3f36b40820044681e data\minecraft\tags\blocks\wooden_stairs.json -5216ba5c57db29b8dee9aebc63a2e3b17c97dc17 data\minecraft\tags\blocks\trapdoors.json -643994ee757a533cfb5001689e0f0263956b8a35 data\minecraft\tags\blocks\mineable\axe.json -5216ba5c57db29b8dee9aebc63a2e3b17c97dc17 data\minecraft\tags\blocks\wooden_trapdoors.json -20183cd61968ff6548df2dde1100b6378d68d64b data\minecraft\tags\blocks\wooden_buttons.json -37cff4ce449b8069b59b2327d78e073fc026d348 data\minecraft\tags\blocks\wooden_pressure_plates.json -6f52ca5e42991af6d7b829f626010ce304277464 data\minecraft\tags\blocks\crystal_sound_blocks.json -6ae561f7399e39ffa0e97bd0569aeffa9eabff6a data\hexcasting\tags\blocks\water_plants.json -9d18fb7a889031a704ca0e553600e1d6f8c3759d data\hexcasting\tags\blocks\directrices.json -7e1e353cb7f561f086898f991ece48e047991934 data\minecraft\tags\blocks\unstable_bottom_center.json -c562b4be24d0b6b13f3c65599d3bfa3bf2c4ce21 data\minecraft\tags\blocks\logs.json -20183cd61968ff6548df2dde1100b6378d68d64b data\minecraft\tags\blocks\buttons.json -e5df19a1dc6eadf14cd9b0f0fe45a74330b745e9 data\minecraft\tags\blocks\planks.json -e5df19a1dc6eadf14cd9b0f0fe45a74330b745e9 data\hexcasting\tags\blocks\edified_planks.json -5bbfd513fd2eb2090b0c2d1ec33504deb79d53b9 data\minecraft\tags\blocks\wooden_slabs.json -fdb48f194d7937ab6b423fa4b90a4d438bf6dd90 data\minecraft\tags\blocks\wooden_doors.json -281cb08b9b68ef049820c4f3f36b40820044681e data\minecraft\tags\blocks\stairs.json -eba53f6c7645de4ef5ffb1e10ef34a4c23e98887 data\hexcasting\tags\blocks\cheap_to_break_block.json -5f3b600b4fd98744bd08c993ce7bcb9c2f195cd2 data\minecraft\tags\blocks\mineable\hoe.json -c562b4be24d0b6b13f3c65599d3bfa3bf2c4ce21 data\hexcasting\tags\blocks\edified_logs.json diff --git a/Fabric/src/generated/resources/.cache/c70ef2fe5da52437c1f53bcc9ea0e416f16bcc0b b/Fabric/src/generated/resources/.cache/c70ef2fe5da52437c1f53bcc9ea0e416f16bcc0b deleted file mode 100644 index c845076e2a..0000000000 --- a/Fabric/src/generated/resources/.cache/c70ef2fe5da52437c1f53bcc9ea0e416f16bcc0b +++ /dev/null @@ -1,220 +0,0 @@ -// 1.20.1 2025-01-23T15:50:44.4089311 Hex Casting/Recipes -1d1e73244fb3da633d8a5f84bad93c6022a94368 data\hexcasting\advancements\recipes\misc\pride_colorizer_demiboy.json -49e706193bb57a957091e419bd0d8aa58135da1f data\hexcasting\recipes\dye_colorizer_green.json -071e5875b13b60aac33bc97e408d2ca710ac5d02 data\hexcasting\advancements\recipes\building_blocks\stonecutting\amethyst_tiles.json -fb852d8e4bcfa7b75f41a6ac7dc1e76b00d95fb1 data\hexcasting\advancements\recipes\misc\dye_colorizer_red.json -9269b17eaae3217422352354fc6006c9808b398c data\hexcasting\recipes\dye_colorizer_black.json -5d6d73e16a36da5f9df6a7b8ac859181d401766d data\hexcasting\recipes\uuid_colorizer.json -e11aeded7f5d3fdd224627c67661bbd993901703 data\hexcasting\recipes\edified_pressure_plate.json -8c52917fc7041c483fb6dfe8d16c90f096f2beaf data\hexcasting\recipes\compat\farmersdelight\cutting\edified_log_amethyst.json -d6b7a9392320c11866b3f139f97977dc9f55bc47 data\hexcasting\recipes\scroll_small.json -c1846dd794f5cc5814b8a839291e82512a02ba12 data\hexcasting\advancements\recipes\misc\pride_colorizer_plural.json -17a1adf747b99848381ca8e7c5e2cd9dd96c014f data\hexcasting\advancements\recipes\misc\default_colorizer.json -f347f4ce869207e62a7887df1252505a3432e12a data\hexcasting\recipes\pride_colorizer_genderfluid.json -f8ee073c1c03f1c11147e4801eeba1f86e5459ba data\hexcasting\recipes\dye_colorizer_blue.json -b16ff5314d457bc7e9e224e102d1e04ce3a62361 data\hexcasting\recipes\brainsweep\directrix_redstone.json -862f1a61a296a834df8a93dbd5a6cdfa2df15721 data\hexcasting\advancements\recipes\tools\staff\acacia.json -ea87956c49dcfabb0d39af45c016130d258181da data\hexcasting\recipes\staff\birch.json -5e66982df6a1074c81f381898033b521ca337695 data\hexcasting\recipes\staff\quenched.json -ee5db13cbb33d9c62bcb1eb645e2c4bea97ad44a data\hexcasting\advancements\recipes\building_blocks\amethyst_dust_unpacking.json -f4c56ea7143ce92a0ae0b663310e53644a7309f7 data\hexcasting\advancements\recipes\misc\pride_colorizer_pansexual.json -3b03fdae3896212a0b8b9b3a2d4880d197e67d2d data\hexcasting\recipes\jeweler_hammer.json -7ca0f9fc6e8ae1ad08ef5c29a0b279b891f7d8d4 data\hexcasting\advancements\recipes\misc\pride_colorizer_aroace.json -b6fa898369ac52cdd9d7f91e3b8a2cb881c3829f data\hexcasting\advancements\recipes\decorations\scroll_medium.json -0654e70ed1ed8be20ae3dd9f4955cd14f9fa40d0 data\hexcasting\advancements\recipes\tools\staff\jungle.json -1b570b35288be9f6faab1536d6e45cb52eb088c0 data\hexcasting\advancements\recipes\tools\staff\dark_oak.json -505eb9192df0b48867e58e09ce36b2259dc6d3e8 data\hexcasting\advancements\recipes\decorations\scroll.json -09096a40275b6c49d4b4e6984869aa43b34712c3 data\hexcasting\recipes\dynamicseal_focus.json -b7084f131b0cdb9c2c698a3c5b3450d69e788d6e data\hexcasting\recipes\dye_colorizer_yellow.json -55602e415fc1b797439b674050887e9e388558c9 data\hexcasting\advancements\recipes\building_blocks\edified_panel.json -a9111ff52513200af47b79cf98b2e545699497bb data\hexcasting\advancements\recipes\building_blocks\amethyst_tiles.json -ea63e49709bd80cb9f4cd1fe13e9bd0281101c9a data\hexcasting\recipes\slate.json -8e48c680b38666c2e7da71fbe4ceddf5d99a5cbc data\hexcasting\advancements\recipes\food\sub_sandwich.json -4d5e4a6374731b2d0a90c70a5d489703fd966977 data\hexcasting\advancements\recipes\misc\dye_colorizer_lime.json -7552df3fc726cc4cdaa88aa4823eff6ce069fb75 data\hexcasting\recipes\slate_block_from_slates.json -72f70637aea1c11683e9ee91d83c2807c6ec33a9 data\hexcasting\recipes\compat\farmersdelight\cutting\akashic_trapdoor.json -2cea013887734cbc4971bcd57e7e4f6a2b25c8e1 data\hexcasting\advancements\recipes\tools\focus.json -f1bae034d27d218bf262a8c777b787d232489f16 data\hexcasting\recipes\lens.json -963d87d2738686e5398a178b8b369228ff067403 data\hexcasting\recipes\spellbook.json -f0e71ae8c6a9170669f44096a55a875d11497c56 data\hexcasting\recipes\staff\warped.json -7c479398bbc7185a2c3efd568ad266d8109245bf data\hexcasting\advancements\recipes\redstone\edified_door.json -7baf0777533737aef68bcac36944943b77138d29 data\hexcasting\recipes\edified_button.json -daa7b13d5370f4306f8cdf3037fc346e8918950a data\hexcasting\recipes\dye_colorizer_brown.json -f08a0aee92b281ae325d907e6fe4a3b03980f2aa data\hexcasting\advancements\recipes\tools\staff\edified.json -61fafd43af83bdca6720d0993ab71f40a8bebd40 data\hexcasting\advancements\recipes\redstone\akashic_connector.json -00853ec1885c1f72674c07caf6fd04904e248f8f data\hexcasting\recipes\brainsweep\directrix_boolean.json -b90ad4cbffc2e3c01671dfe8bda5e42d9b8a685c data\hexcasting\advancements\recipes\tools\staff\crimson.json -ef96ae9709ec931ce6b6af8a539f9bc483236449 data\hexcasting\recipes\scroll_medium.json -552c235dc58a46a3e57913c9b9faf3f21abeae32 data\hexcasting\advancements\recipes\building_blocks\stripped_edified_wood.json -a0b87b1b21506708d09c9295b7afc13de6b1fce6 data\hexcasting\recipes\pride_colorizer_aromantic.json -ae88fcdecbfbdd0a0fe778467421a3b32d7ed735 data\create\recipes\crushing\amethyst_cluster.json -aa7558ec1baf6070efbe448d886e20e964e33f96 data\hexcasting\advancements\recipes\brainsweep\brainsweep\quench_allay.json -a8d604ba059d54502837809815d3ac9bbcaa89bf data\hexcasting\advancements\recipes\redstone\akashic_bookshelf.json -5889e2df2fb4e1ea29f2590b96bb3aa94961a09a data\hexcasting\recipes\scroll.json -0038883bd294cc8a1b324d6782478d5e37b4dbf9 data\hexcasting\advancements\recipes\misc\dye_colorizer_pink.json -71f821f5d24b0bf9ecd860d51e055628fe4af50c data\hexcasting\recipes\edified_panel.json -7e1a5a873d655e0efba80f22ae9b1de4f248e67a data\hexcasting\advancements\recipes\misc\decompose_quenched_shard\shard.json -417695497a95436186c1a4ed842d7975d754f9eb data\hexcasting\recipes\stripped_edified_wood.json -92bdf87687d8823036fae6bd01782c653831286b data\hexcasting\recipes\brainsweep\impetus_look.json -3608f0ec056f2c5d29a9a89305218497fd2c4383 data\hexcasting\recipes\stonecutting\amethyst_tiles.json -8815ea5d8d7379062e050adc5736cc579c3bdd9e data\hexcasting\recipes\edified_stairs.json -f482a4349786388cc8f11d5550548f7d60265438 data\hexcasting\recipes\staff\mangrove.json -6e2dc32f975d987b8dfd329507334f647bceadc0 data\hexcasting\advancements\recipes\tools\staff\mangrove.json -5a90084c03d6e8424872870c8b65f4771b447f03 data\hexcasting\recipes\brainsweep\budding_amethyst.json -2eacf53894ae97712dc3874777e29dce0a0e5540 data\hexcasting\advancements\recipes\misc\pride_colorizer_asexual.json -af9a260c24e0a65eea321f0dd9dd2fa7d648707f data\hexcasting\advancements\recipes\building_blocks\amethyst_dust_packing.json -24c244e53c7e47b85845d2ee36b1665410cf495a data\hexcasting\recipes\edified_planks.json -b84c113ef5321c9df9ac9080de03e8d8639feab2 data\hexcasting\advancements\recipes\misc\pride_colorizer_genderqueer.json -97062771a426f6e4b9e3bfd6daa62b1d4b3c7039 data\hexcasting\recipes\abacus.json -41a570f970c9af8229cb1140a11a5220fac00957 data\hexcasting\advancements\recipes\tools\staff\spruce.json -2c56c267e23e75d5a3b9358d424d69642e001b50 data\hexcasting\recipes\decompose_quenched_shard\dust.json -4003f297be29810cebde4995fb2838c2c68a25ea data\hexcasting\recipes\pride_colorizer_lesbian.json -5f216dbb7b89fd837e2dd73e3ed41c8d412de234 data\hexcasting\advancements\recipes\misc\decompose_quenched_shard\dust.json -648f1862fde1dd8ade80b2991b8c8e3991389e95 data\hexcasting\recipes\dye_colorizer_light_blue.json -fb486df96798724da2fcc0df5706f19bc1ff94dc data\hexcasting\advancements\recipes\misc\dye_colorizer_light_blue.json -946cde51bbfc2af344b078f6b39389ffc44462f4 data\hexcasting\advancements\recipes\brainsweep\brainsweep\impetus_storedplayer.json -0b951ce7b9d1bfb07ae012b12225b595d36c6e66 data\hexcasting\recipes\amethyst_dust_packing.json -838b91c33a72a58aa286607eaaa17cdd6b4c90ba data\hexcasting\recipes\amethyst_sconce.json -8f515bf8ccea70b3d88845ed83966dc0c66082f6 data\hexcasting\advancements\recipes\tools\staff\oak.json -0f2e63a9361d18aac764f6a4a4f13b9b862ac2ee data\hexcasting\recipes\compat\create\crushing\amethyst_shard.json -cedc2889c4f327b18755bbe8c3c595d302e2a9d0 data\hexcasting\recipes\decompose_quenched_shard\shard.json -2003fed3aa4eb622b6b07a9e65946fb40be14420 data\hexcasting\advancements\recipes\brainsweep\brainsweep\impetus_rightclick.json -7d71eb93bbb0856167cf4521283e39f0048078ee data\hexcasting\advancements\recipes\redstone\edified_button.json -0bd7c9f4a9bf29c1b63b2f9378f0a7e2f594b7b7 data\hexcasting\recipes\pride_colorizer_nonbinary.json -157ee5fba985bbd01a87f44578890dab5489a8e5 data\hexcasting\advancements\recipes\misc\dye_colorizer_green.json -c2ef04b311251b4eb22320b2f5313c54533a9974 data\hexcasting\advancements\recipes\tools\staff\birch.json -2fff80cd3dabd2bc1744eecd72b2364b0f91c7c1 data\hexcasting\advancements\recipes\misc\dye_colorizer_yellow.json -e536791d0c6fb48206e6e30d56879eaf0a9e4bd7 data\hexcasting\recipes\akashic_bookshelf.json -faaa9c39dbcdd131c5fbec9ac6a26d6dc5e72053 data\hexcasting\advancements\recipes\misc\dye_colorizer_light_gray.json -e0609202271e402d8ae58e4f8eaf11dcdda10a9e data\hexcasting\recipes\brainsweep\akashic_record.json -3bf96944a8eed8b8d3f5d96b609297727c078cb7 data\hexcasting\advancements\recipes\misc\dye_colorizer_purple.json -203b7035125390abb4ed77b3a4dca8f8f8f57bc5 data\hexcasting\recipes\dye_colorizer_light_gray.json -e691130641b11c0a030a51c71dee0ba356f3b5bd data\hexcasting\recipes\compat\farmersdelight\cutting\edified_log_aventurine.json -8f7b81add0153ad94900acc66cd8174ae7115f64 data\hexcasting\advancements\recipes\building_blocks\slate_block_from_slates.json -06402fb37fe4bb05918d13dbfdb89f4c2b67f3ec data\hexcasting\advancements\recipes\tools\cypher.json -c8f2ad363e4d20054f4e56fde02c8775a45a7169 data\hexcasting\recipes\artifact.json -8bea75fdc5e64c464dcf5f85166e767ff44e6dc2 data\hexcasting\advancements\recipes\misc\pride_colorizer_lesbian.json -c6228d72ca800a7dd336e82bbb9b4f20f89de29d data\hexcasting\advancements\recipes\redstone\edified_pressure_plate.json -0aaf55492e850d2bb1ec2f9986406ca61fde4cfd data\hexcasting\recipes\dye_colorizer_lime.json -e6a592721234448f2ee7ec402bca10a9b78b4677 data\hexcasting\advancements\recipes\decorations\slate.json -e9166f40c8797cdbf3d8062dfa35c74f850f1000 data\hexcasting\advancements\recipes\misc\dye_colorizer_white.json -2aa7d74e29a7c5ee4f1b8835cf7c6109eed81d77 data\hexcasting\recipes\brainsweep\quench_allay.json -f81053a3269c1b371be3f8057bad4803056ee0f9 data\hexcasting\recipes\dye_colorizer_orange.json -bc729ac7cf84d29a99cd34d50c152c0b9d20bd7a data\hexcasting\advancements\recipes\brainsweep\brainsweep\akashic_record.json -1a9dd55a24f56a4e9467f1117e0898f7e71ade67 data\hexcasting\advancements\recipes\decorations\amethyst_sconce.json -d7de5d626fd799a2522af36f0c62c52fe490e6d2 data\hexcasting\recipes\edified_door.json -c3f7b03fe184ed5e54a8ae06d130adf507b7683d data\hexcasting\recipes\staff\bamboo.json -6f2634e5588aede8e29157ecc859652d8a9f4065 data\hexcasting\advancements\recipes\misc\dye_colorizer_orange.json -b10d590e918e35b16578a8b739a1c4e7e2202e16 data\hexcasting\advancements\recipes\misc\dye_colorizer_cyan.json -0e792d49c81d2164e827d1bdedaa0fa358dfc437 data\hexcasting\advancements\recipes\misc\pride_colorizer_aromantic.json -afb422ad4a918ee0161bf077f09475bb1da2b4eb data\hexcasting\recipes\amethyst_dust_unpacking.json -98c0843e6a83b91820f1c720e206295eec20ff95 data\hexcasting\recipes\ancient_scroll_paper.json -011f8daf15148d4b77686c6d382d8f5c288a333d data\hexcasting\advancements\recipes\building_blocks\ancient_scroll_paper.json -9b7c5220fbaf3e84fa9e81eae322eed5d37b22d3 data\hexcasting\recipes\pride_colorizer_transgender.json -a1f9df0537c0ef33a1164cf94e8ff4b1094f889f data\hexcasting\advancements\recipes\tools\staff\warped.json -54335e0004423899ad37763a1d8456cc0a6e72a7 data\hexcasting\advancements\recipes\misc\decompose_quenched_shard\charged.json -641d8c38b8109665314fccbebd9068ba10b04118 data\hexcasting\advancements\recipes\misc\dye_colorizer_gray.json -5e98cec2084f0cfbb959c3ec39bd85a3369f443b data\hexcasting\advancements\recipes\tools\abacus.json -b300f7729e75614fce412457f6717686680f81da data\hexcasting\recipes\sub_sandwich.json -1a0d55e6824c078453c1d44e885a1c51ba707a41 data\hexcasting\recipes\dye_colorizer_white.json -36d26f34d0405ff2d1e728e5b5174502686e3590 data\hexcasting\advancements\recipes\brainsweep\brainsweep\budding_amethyst.json -903cbe4d4c4e5abcd5e006f9d0237e8c596228ba data\hexcasting\recipes\edified_tile.json -1093cccc6b1c45eb91f7c1680ef575a7bffb2744 data\hexcasting\advancements\recipes\building_blocks\edified_planks.json -233aeedc73173427e7b2287772a4f914f97b072c data\hexcasting\recipes\dye_colorizer_red.json -2a2f60fb0f63ee278b74c418acf04575304c521f data\hexcasting\advancements\recipes\tools\jeweler_hammer.json -004e0694b3bf53140be7df89a4defc255b800619 data\hexcasting\advancements\recipes\tools\focus_rotated.json -ea46e570a43cd3ea1cc78c51d9da45d93944730a data\hexcasting\advancements\recipes\redstone\directrix\empty.json -4d941fc399c6b7a470513a572ecd88982823da84 data\hexcasting\advancements\recipes\building_blocks\edified_wood.json -aa1caae7eba6aede0f179619488e2253b3b723dd data\hexcasting\recipes\focus_rotated.json -b1f8375aaf0d66035dee720ea59605f69fc0a154 data\hexcasting\recipes\edified_fence.json -1b092acfc3115702c74e141492e649d58512f259 data\hexcasting\recipes\staff\oak.json -0864e8b86bdad0bf9ab2ddeb0cd5a182808b5a0a data\hexcasting\recipes\default_colorizer.json -40ed21dc80d39236ca0e6d2cea60861c637cf931 data\hexcasting\advancements\recipes\misc\pride_colorizer_nonbinary.json -04902d4eca30560bc601a8196d82f74f3fa5b191 data\hexcasting\recipes\dynamicseal_spellbook.json -bd63b845e02ee4b1b9abe168a196335ccbed1ca5 data\hexcasting\recipes\scroll_paper_lantern.json -996c8361766377a70e0b5a5caff3076fc6031b0a data\hexcasting\recipes\impetus\empty.json -8b7136c206b799a2e394aa02316b0509674ff64f data\hexcasting\advancements\recipes\tools\staff\bamboo.json -c1541738df1ee41c362ad3b9c3a9f0e181bd5c62 data\hexcasting\recipes\pride_colorizer_plural.json -4a803e049915fd3c7144155ae3a1b05a917ea290 data\hexcasting\recipes\pride_colorizer_pansexual.json -71d38559bf455ea343ac0237a57db4d3f0833a7c data\hexcasting\advancements\recipes\misc\dye_colorizer_magenta.json -9ea4fe5272ce2241d98f30359f55cfc1936c7b48 data\hexcasting\advancements\recipes\tools\staff\cherry.json -72447ac69a0d85f91064180d3c852040a9e33832 data\hexcasting\recipes\pride_colorizer_asexual.json -a8cab28cffdf495253a320094d202fccc5aeb113 data\hexcasting\advancements\recipes\decorations\ancient_scroll_paper_lantern.json -14f3b217e150efbbff329d67aec96f818a1da99c data\hexcasting\recipes\dye_colorizer_purple.json -1e51cd4f527b3aea4d61d91829e47c191c9c05bb data\hexcasting\recipes\pride_colorizer_gay.json -f64fa00d85a9abb24e89b0d2c9f818001371f5e6 data\hexcasting\recipes\slate_block.json -a85cfbd7988f5df0b18d160591605aea8e6808d2 data\hexcasting\recipes\trinket.json -63189af501442318a90c16d6951e51c0c5d6d4f3 data\hexcasting\recipes\compat\farmersdelight\cutting\edified_log_purple.json -494aa470790ae46baebbf24ee5b76f5885c1af1a data\hexcasting\recipes\ageing_scroll_paper_lantern.json -bc8fe4d2f55fe119b0b146a71782a3d4788380b1 data\create\recipes\crushing\amethyst_block.json -7522be58b09554a3f1a54d5b2343c3eab01447a3 data\hexcasting\recipes\dye_colorizer_magenta.json -b624d103d944a8a1d4d8a9e85c198a5492b476f8 data\hexcasting\advancements\recipes\redstone\edified_trapdoor.json -a3130e3098e35b75afae4f31996d9ab7468e0bc3 data\hexcasting\advancements\recipes\tools\thought_knot.json -23eff6111b0385b66d3ad5fbabfc625f426517a6 data\hexcasting\advancements\recipes\brainsweep\brainsweep\directrix_redstone.json -c43fb770003c8d882fd9c1e7d1ecb5f196cba1ab data\hexcasting\recipes\cypher.json -2c292e12b5e85b1701740c222e5c5465799ad1dc data\hexcasting\recipes\pride_colorizer_aroace.json -dcc9bf721dd40724abcc69f1f7e8a1610dbf88f3 data\hexcasting\recipes\compat\farmersdelight\cutting\akashic_door.json -f77518b6993fe8e31de10af286c33ab72c0f9077 data\hexcasting\advancements\recipes\redstone\impetus\empty.json -93ed0491548920bc75797d18501c750ef07fe3ea data\hexcasting\advancements\recipes\misc\pride_colorizer_bisexual.json -27dc4a1647f264c45b27f5552fd9403a02853484 data\hexcasting\advancements\recipes\tools\spellbook.json -7166cd4355d11c209bc7749bc862caddcfd795fb data\hexcasting\recipes\dye_colorizer_cyan.json -b6720c1c73455ad817bac9b5ca2ca045c5c4050c data\hexcasting\recipes\pride_colorizer_agender.json -ed5c690324e3d9b55599f00f078ae225072a2e7f data\hexcasting\recipes\brainsweep\impetus_rightclick.json -c4b985635c3b1a519d7a83da65daba5bdd3a5f59 data\hexcasting\advancements\recipes\decorations\ageing_scroll_paper_lantern.json -846baaef37844216b57bb9b35e52b1bb6b56b413 data\hexcasting\advancements\recipes\decorations\scroll_small.json -441f336edb635e5d8c2a7183906fed1c501f06fd data\hexcasting\recipes\pride_colorizer_bisexual.json -f80dbf59957be175fbcd63224005e09c4cd1a122 data\hexcasting\recipes\compat\farmersdelight\cutting\edified_log_citrine.json -a72a0fcc0f3a81d31b30a7a626aef537796ca73b data\hexcasting\advancements\recipes\tools\staff\quenched.json -8f8773a541bc6a4a6c55a23f4f98b5da4f61a031 data\hexcasting\recipes\scroll_paper.json -4680e9dafcf9b60b3485609519d66eefcfd539bc data\hexcasting\recipes\staff\dark_oak.json -77369113dc54d1c64b9101861dd8a1930bf1c1c4 data\hexcasting\recipes\edified_wood.json -45915b542d8070f2502a4047218679b08033b12d data\hexcasting\advancements\recipes\decorations\scroll_paper_lantern.json -a366ea3750adc0d336ab8f318c40baed3f9c3eb7 data\hexcasting\recipes\brainsweep\impetus_storedplayer.json -151875101066f7af5788c7a2e1c6b342971a546a data\hexcasting\recipes\compat\farmersdelight\cutting\akashic_wood.json -b94bc4dd4a63db10af86c524ba00eae157c1824b data\hexcasting\advancements\recipes\building_blocks\edified_fence_gate.json -c2a0a489967db4064dfbe1ee6367e132665f3c00 data\hexcasting\recipes\edified_slab.json -5e28e2c352366720ce91b73f8c8c38e217f7198d data\hexcasting\recipes\edified_fence_gate.json -6493676f8ca93a7be8d70e25d69ddad935b3f16b data\hexcasting\advancements\recipes\tools\lens.json -b5946314683e5a823b577a18d13fb437a35aafd5 data\hexcasting\recipes\decompose_quenched_shard\charged.json -c03c81dc123294472e8bb6f836c319e96f8db4f5 data\hexcasting\advancements\recipes\building_blocks\edified_fence.json -b29f9d9c14e60ded1148680e2e0ef405b5a3c845 data\hexcasting\advancements\recipes\misc\uuid_colorizer.json -78958099bf4337ad281580d90f434b3074ad18c8 data\hexcasting\recipes\pride_colorizer_genderqueer.json -0b172aef920da7ba63fe152903ce005c1f5df5f1 data\hexcasting\recipes\staff\acacia.json -31ec6474ddae967a6c1dadf9be8292d375510364 data\hexcasting\advancements\recipes\building_blocks\edified_tile.json -d47352426739a0fc500a385d820d767a307e1d16 data\hexcasting\advancements\recipes\misc\dye_colorizer_black.json -095aeb2882c6849f10fb6536e7c780790778e5e7 data\hexcasting\recipes\staff\jungle.json -923e7cd200518042f11474713eca9ccad126dab7 data\hexcasting\recipes\staff\spruce.json -fd7c8325fcaa6a718e90c09251b447fb365523d4 data\hexcasting\recipes\pride_colorizer_demiboy.json -2b64261bd4aefdc55d35400f25835434f88856cf data\hexcasting\recipes\amethyst_tiles.json -12bd3d04c791ef16aad5e992f038d6726229a436 data\hexcasting\advancements\recipes\tools\artifact.json -de38d15e7a91c77df24c1dc954b3e98ee197876f data\hexcasting\recipes\focus.json -fd2f25b0a71806c96af5a307fad76f66de6210a4 data\hexcasting\advancements\recipes\building_blocks\slate_block.json -1ad54df5eaee3d1e810d2c91bd03f626084e30b6 data\hexcasting\recipes\edified_trapdoor.json -4aaefc65af5fe69d312247fdda7d983edf8dcd9a data\hexcasting\recipes\pride_colorizer_intersex.json -b20be6eb5a8b60567871444e65d773ec9a67ece1 data\hexcasting\recipes\staff\crimson.json -775560efa36581389c0319435bda035be262ed4f data\hexcasting\advancements\recipes\building_blocks\edified_stairs.json -ce9d0b976f7cc8ad4a0815bbea6c43115addb90f data\hexcasting\advancements\recipes\building_blocks\scroll_paper.json -db5ae3a2fda235cf1c83fd83e0026a262e668217 data\hexcasting\advancements\recipes\building_blocks\edified_slab.json -06ca609ba1a32f094cf6edbc989bc9ddaf9d342c data\hexcasting\advancements\recipes\misc\pride_colorizer_genderfluid.json -af8fe74b624df4a31727347b9826614a66092b0a data\hexcasting\advancements\recipes\misc\pride_colorizer_agender.json -664ce1a38c9b1c9ec21b7e078631e181fc0b2498 data\hexcasting\recipes\staff\edified.json -b6e762c198b9632defd7f8b11287702abecd681d data\hexcasting\recipes\staff\mindsplice.json -5401828f85e709b5817ecc8464dc63e536a730dc data\hexcasting\recipes\staff\cherry.json -51b047601368a103be166d907633b196d2d8a4e8 data\hexcasting\recipes\compat\farmersdelight\cutting\edified_log.json -42b8e462de1d7006de3a7658757377450e773107 data\hexcasting\advancements\recipes\misc\dye_colorizer_blue.json -499c5c09e3772989350f9ab3264b8692449a6dea data\hexcasting\advancements\recipes\misc\pride_colorizer_gay.json -30352d8ad510768770bb1b2d378959b7a502f825 data\hexcasting\advancements\recipes\brainsweep\brainsweep\impetus_look.json -6ed61e03c51dc653cd66e643a6d33fe9105ff171 data\hexcasting\advancements\recipes\brainsweep\brainsweep\directrix_boolean.json -0ead307e47242ba140584f6bd20088a1fa7c2909 data\hexcasting\recipes\directrix\empty.json -68ab70e0b4e432a3492767c5597ecd836f106714 data\hexcasting\advancements\recipes\tools\staff\mindsplice.json -5fab1b9c93304a53a4c305b511704458e4593444 data\hexcasting\recipes\pride_colorizer_demigirl.json -170af3c83a45f9550827cc48e4bb5a621d06d685 data\hexcasting\advancements\recipes\misc\pride_colorizer_transgender.json -7f2f29981df2ca4464ee0250180e670f5331f65b data\hexcasting\recipes\dye_colorizer_pink.json -61e53f02baefd31308e99407d56403dfc18e36e1 data\hexcasting\recipes\akashic_connector.json -eb9ebf77f0daa32f665a60888fcda19c940f0b2f data\hexcasting\advancements\recipes\misc\pride_colorizer_demigirl.json -7aa3bf4a3d6fb92743b29dfe89d50537fefc0db9 data\hexcasting\advancements\recipes\misc\pride_colorizer_intersex.json -410bfde90cb977db3f13814e94484fa11fca7cfc data\hexcasting\recipes\thought_knot.json -55ea553a96e1d6a54385890f7c48fe7b2bed6871 data\hexcasting\advancements\recipes\tools\trinket.json -e765ee2bd324240e8ed3d625be431de3281f0070 data\hexcasting\recipes\dye_colorizer_gray.json -ad647a2078099344ea7f9836a68e1bf8e8119277 data\hexcasting\advancements\recipes\misc\dye_colorizer_brown.json -8c043c7f6a7911b67324e2fd42f0b3b19a792af3 data\hexcasting\recipes\ancient_scroll_paper_lantern.json From 4910137f2a87e6bd334ddbb787bdc2f6fea00d69 Mon Sep 17 00:00:00 2001 From: Stickia Date: Fri, 20 Jun 2025 12:40:44 -0400 Subject: [PATCH 08/18] Removed "knownPositions" replaced with 2 BlockPos values --- .../casting/circles/CircleExecutionState.java | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 35e764c7cc..acb7cebce9 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -31,19 +31,19 @@ public class CircleExecutionState { public static final String TAG_IMPETUS_POS = "impetus_pos", TAG_IMPETUS_DIR = "impetus_dir", - TAG_KNOWN_POSITIONS = "known_positions", TAG_REACHED_POSITIONS = "reached_positions", TAG_CURRENT_POS = "current_pos", TAG_ENTERED_FROM = "entered_from", TAG_IMAGE = "image", TAG_CASTER = "caster", TAG_PIGMENT = "pigment", - TAG_REACHED_NUMBER = "reached_slate"; + TAG_REACHED_NUMBER = "reached_slate", + TAG_POSITIVE_POS = "positive_pos", + TAG_NEGATIVE_POS = "negative_pos"; public final BlockPos impetusPos; public final Direction impetusDir; // Does contain the starting impetus - public final Set knownPositions; public final HashSet reachedPositions; public BlockPos currentPos; public Direction enteredFrom; @@ -53,15 +53,19 @@ public class CircleExecutionState { // This controls the speed of the current slate public Long reachedSlate; + // Tracks the highest pos, and lowest pos of the AABB + public BlockPos positivePos; + public BlockPos negativePos; + public final AABB bounds; - protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set knownPositions, + protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, - CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, @Nullable Long reachedSlate) { + CastingImage currentImage, @Nullable UUID caster, @Nullable FrozenPigment casterPigment, @Nullable Long reachedSlate, + BlockPos positivePos, BlockPos negativePos) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; - this.knownPositions = knownPositions; this.reachedPositions = reachedPositions; this.currentPos = currentPos; this.enteredFrom = enteredFrom; @@ -70,7 +74,10 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set(this.knownPositions)); + this.positivePos = positivePos; + this.negativePos = negativePos; + + this.bounds = new AABB(positivePos,negativePos); } public @Nullable ServerPlayer getCaster(ServerLevel world) { @@ -148,7 +155,6 @@ cost and generally cheating the system. What would be best would be (somehow) ge return new Result.Err<>(seenGoodPositions.get(seenGoodPositions.size() - 1)); } - var knownPositions = new HashSet<>(seenGoodPositions); var reachedPositions = new HashSet(); reachedPositions.add(impetus.getBlockPos()); var start = seenGoodPositions.get(0); @@ -161,9 +167,11 @@ cost and generally cheating the system. What would be best would be (somehow) ge colorizer = HexAPI.instance().getColorizer(caster); casterUUID = caster.getUUID(); } + AABB aabb = BlockEntityAbstractImpetus.getBounds(seenGoodPositions); return new Result.Ok<>( - new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), knownPositions, - reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0L)); + new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), + reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, + 0L, new BlockPos((int) aabb.maxX, (int) aabb.maxY, (int) aabb.maxZ), new BlockPos((int) aabb.minX, (int) aabb.minY, (int) aabb.minZ))); } public CompoundTag save() { @@ -172,12 +180,6 @@ public CompoundTag save() { out.put(TAG_IMPETUS_POS, NbtUtils.writeBlockPos(this.impetusPos)); out.putByte(TAG_IMPETUS_DIR, (byte) this.impetusDir.ordinal()); - var knownTag = new ListTag(); - for (var bp : this.knownPositions) { - knownTag.add(NbtUtils.writeBlockPos(bp)); - } - out.put(TAG_KNOWN_POSITIONS, knownTag); - var reachedTag = new ListTag(); for (var bp : this.reachedPositions) { reachedTag.add(NbtUtils.writeBlockPos(bp)); @@ -202,11 +204,6 @@ public static CircleExecutionState load(CompoundTag nbt, ServerLevel world) { var startPos = NbtUtils.readBlockPos(nbt.getCompound(TAG_IMPETUS_POS)); var startDir = Direction.values()[nbt.getByte(TAG_IMPETUS_DIR)]; - var knownPositions = new HashSet(); - var knownTag = nbt.getList(TAG_KNOWN_POSITIONS, Tag.TAG_COMPOUND); - for (var tag : knownTag) { - knownPositions.add(NbtUtils.readBlockPos(HexUtils.downcast(tag, CompoundTag.TYPE))); - } var reachedPositions = new HashSet(); var reachedTag = nbt.getList(TAG_REACHED_POSITIONS, Tag.TAG_COMPOUND); for (var tag : reachedTag) { @@ -226,12 +223,19 @@ public static CircleExecutionState load(CompoundTag nbt, ServerLevel world) { pigment = FrozenPigment.fromNBT(nbt.getCompound(TAG_PIGMENT)); long reachedNumber = 0; - if (nbt.contains(TAG_REACHED_NUMBER, Tag.TAG_LONG)){ + if (nbt.contains(TAG_REACHED_NUMBER, Tag.TAG_LONG)) reachedNumber = nbt.getLong(TAG_REACHED_NUMBER); - } - return new CircleExecutionState(startPos, startDir, knownPositions, reachedPositions, currentPos, - enteredFrom, image, caster, pigment, reachedNumber); + BlockPos.MutableBlockPos positivePos = new BlockPos.MutableBlockPos(); + if (nbt.contains(TAG_POSITIVE_POS)) + positivePos.set(NbtUtils.readBlockPos(nbt.getCompound(TAG_POSITIVE_POS))); + + BlockPos.MutableBlockPos negativePos = new BlockPos.MutableBlockPos(); + if (nbt.contains(TAG_NEGATIVE_POS)) + negativePos.set(NbtUtils.readBlockPos(nbt.getCompound(TAG_NEGATIVE_POS))); + + return new CircleExecutionState(startPos, startDir, reachedPositions, currentPos, + enteredFrom, image, caster, pigment, reachedNumber,positivePos,negativePos); } /** From 2fdf0e31016e8a186c24e10aef52e966b9ad188e Mon Sep 17 00:00:00 2001 From: Stickia Date: Fri, 20 Jun 2025 23:00:56 -0400 Subject: [PATCH 09/18] Spell Circle block flood-find *should* now be optimized more, since its no longer doing an extra for loop at the end --- .../casting/circles/CircleExecutionState.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index acb7cebce9..8c6dbf4eda 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -105,7 +105,10 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, var todo = new Stack>(); todo.add(Pair.of(impetus.getStartDirection(), impetus.getBlockPos().relative(impetus.getStartDirection()))); var seenGoodPosSet = new HashSet(); - var seenGoodPositions = new ArrayList(); + var positiveBlock = new BlockPos.MutableBlockPos(); + var negativeBlock = new BlockPos.MutableBlockPos(); + var lastBlockPos = new BlockPos.MutableBlockPos(); + BlockPos firstBlock = null; while (!todo.isEmpty()) { /* @@ -137,8 +140,23 @@ cost and generally cheating the system. What would be best would be (somehow) ge } if (seenGoodPosSet.add(herePos)) { + if (firstBlock == null) { + firstBlock = herePos; + negativeBlock.set(firstBlock); + positiveBlock.set(firstBlock); + } + lastBlockPos.set(herePos); + // Checks to see if it should update the most positive/negative block pos + if (herePos.getX() > positiveBlock.getX()) positiveBlock.setX(herePos.getX()); + if (herePos.getX() < negativeBlock.getX()) negativeBlock.setX(herePos.getX()); + + if (herePos.getY() > positiveBlock.getY()) positiveBlock.setY(herePos.getY()); + if (herePos.getY() < negativeBlock.getY()) negativeBlock.setY(herePos.getY()); + + if (herePos.getZ() > positiveBlock.getZ()) positiveBlock.setZ(herePos.getZ()); + if (herePos.getZ() < negativeBlock.getZ()) negativeBlock.setZ(herePos.getZ()); + // it's new - seenGoodPositions.add(herePos); var outs = cmp.possibleExitDirections(herePos, hereBs, level); for (var out : outs) { todo.add(Pair.of(out, herePos.relative(out))); @@ -146,18 +164,17 @@ cost and generally cheating the system. What would be best would be (somehow) ge } } - if (seenGoodPositions.isEmpty()) { + if (firstBlock == null) { return new Result.Err<>(null); } else if (!seenGoodPosSet.contains(impetus.getBlockPos())) { // we can't enter from the side the directrix exits from, so this means we couldn't loop back. // the last item we tried to examine will always be a terminal slate (b/c if it wasn't, // then the *next* slate would be last qed) - return new Result.Err<>(seenGoodPositions.get(seenGoodPositions.size() - 1)); + return new Result.Err<>(lastBlockPos); } var reachedPositions = new HashSet(); reachedPositions.add(impetus.getBlockPos()); - var start = seenGoodPositions.get(0); FrozenPigment colorizer = null; UUID casterUUID; @@ -167,11 +184,10 @@ cost and generally cheating the system. What would be best would be (somehow) ge colorizer = HexAPI.instance().getColorizer(caster); casterUUID = caster.getUUID(); } - AABB aabb = BlockEntityAbstractImpetus.getBounds(seenGoodPositions); return new Result.Ok<>( new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), - reachedPositions, start, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, - 0L, new BlockPos((int) aabb.maxX, (int) aabb.maxY, (int) aabb.maxZ), new BlockPos((int) aabb.minX, (int) aabb.minY, (int) aabb.minZ))); + reachedPositions, firstBlock, impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, + 0L, positiveBlock.move(1,1,1), negativeBlock)); } public CompoundTag save() { From 374c99110c532e9ad7230c1be88eac4aa622151c Mon Sep 17 00:00:00 2001 From: Stickia Date: Wed, 25 Jun 2025 00:07:36 -0400 Subject: [PATCH 10/18] Removed unnecessary logger in BlockEntityRedstoneImpetus#getStoredPlayer --- .../blocks/circles/impetuses/BlockEntityRedstoneImpetus.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java index b776d156ce..b668591aab 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java @@ -88,7 +88,6 @@ public ServerPlayer getStoredPlayer() { if (e instanceof ServerPlayer player) { return player; } else { - HexAPI.LOGGER.error("Entity {} stored in a cleric impetus wasn't a player somehow", e); return null; } } From b0d92924e24f0e77f6045145ea976bfeaf4ad366 Mon Sep 17 00:00:00 2001 From: Stickia Date: Sat, 28 Jun 2025 11:51:17 -0400 Subject: [PATCH 11/18] Forgot saving the Negative and Positive block positions --- .../api/casting/circles/CircleExecutionState.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 8c6dbf4eda..cb0a80e6b8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -15,10 +15,10 @@ import net.minecraft.nbt.NbtUtils; import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; +import net.minecraft.server.level.*; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; import org.jetbrains.annotations.Nullable; @@ -131,7 +131,7 @@ cost and generally cheating the system. What would be best would be (somehow) ge var enterDir = pair.getFirst(); var herePos = pair.getSecond(); - var hereBs = level.getBlockState(herePos); + BlockState hereBs = level.getLevel().getBlockState(herePos); //FUCK THIS LINE. THIS FUC- if (!(hereBs.getBlock() instanceof ICircleComponent cmp)) { continue; } @@ -213,6 +213,10 @@ public CompoundTag save() { out.put(TAG_PIGMENT, this.casterPigment.serializeToNBT()); out.putLong(TAG_REACHED_NUMBER, this.reachedSlate); + + out.put(TAG_POSITIVE_POS,NbtUtils.writeBlockPos(this.positivePos)); + out.put(TAG_NEGATIVE_POS,NbtUtils.writeBlockPos(this.negativePos)); + return out; } From 7ba2790787d499b850d42c11138f570efc0b2cfb Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 29 Jun 2025 00:14:08 -0400 Subject: [PATCH 12/18] Decreased spell circle scan time --- .../casting/circles/CircleExecutionState.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index cb0a80e6b8..789e95321d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -18,11 +18,15 @@ import net.minecraft.server.level.*; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.ChunkAccess; +import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.phys.AABB; import org.jetbrains.annotations.Nullable; import java.util.*; +import java.util.concurrent.ExecutionException; /** * See {@link BlockEntityAbstractImpetus}, this is what's stored in it @@ -109,7 +113,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, var negativeBlock = new BlockPos.MutableBlockPos(); var lastBlockPos = new BlockPos.MutableBlockPos(); BlockPos firstBlock = null; - + HashMap chunkSet = new HashMap<>(); while (!todo.isEmpty()) { /* Sophia/Stickia here! @@ -131,7 +135,24 @@ cost and generally cheating the system. What would be best would be (somehow) ge var enterDir = pair.getFirst(); var herePos = pair.getSecond(); - BlockState hereBs = level.getLevel().getBlockState(herePos); //FUCK THIS LINE. THIS FUC- + BlockState hereBs; + var chunkPos = new ChunkPos(herePos); + + if (!chunkSet.containsKey(chunkPos)) { + var z = level.getChunkSource().getChunkFuture(chunkPos.x,chunkPos.z, ChunkStatus.EMPTY,true); + try { + if (z.get().left().isPresent()){ + chunkSet.put(chunkPos,z.get().left().get()); + hereBs = z.get().left().get().getBlockState(herePos); + } else { + hereBs = level.getLevel().getBlockState(herePos); + } + } catch (InterruptedException | ExecutionException e) { + hereBs = level.getLevel().getBlockState(herePos); + } + } else { + hereBs = chunkSet.get(chunkPos).getBlockState(herePos); + } if (!(hereBs.getBlock() instanceof ICircleComponent cmp)) { continue; } From 2ef2090100974268e78ae2a9c2877b19855dce05 Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 29 Jun 2025 00:31:59 -0400 Subject: [PATCH 13/18] Removed comment --- .../api/casting/circles/CircleExecutionState.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 789e95321d..322f62f6d8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -115,21 +115,6 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, BlockPos firstBlock = null; HashMap chunkSet = new HashMap<>(); while (!todo.isEmpty()) { - /* - Sophia/Stickia here! - This block of code works well enough, it gets all the ICircleComponent that it can. However, - this tries to do all the calculating in a single tick, so it can get *really* laggy for larger circles. - So, this `while` would likely need to be moved into the #tick method, so it can be spread out over time during start up. - Why are these comments here? Likely so Sophia can remember this for after she gets sleep, or if anyone - else wants to take up the challenge. As for her system will work, but not be clean lmao - - As brought up by Chloe, the slates *could* change during start up. - Meaning someone could just place/remove slate at the same rate of discovery, and have World Ambit for almost no slate - cost and generally cheating the system. What would be best would be (somehow) getting the block slate - without loading the chunk its self, meaning servers wont have to handle 1000s of chunks being loaded at once - and players not cheating the system. - But this is easier said than done. - */ var pair = todo.pop(); var enterDir = pair.getFirst(); From a0a38fd6e487df911cf45ad26386b78a6609a570 Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 29 Jun 2025 19:24:25 -0400 Subject: [PATCH 14/18] Added config limit Also added in small Comments --- .../casting/circles/CircleExecutionState.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 322f62f6d8..eb1c3978d7 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -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; @@ -113,7 +114,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, var negativeBlock = new BlockPos.MutableBlockPos(); var lastBlockPos = new BlockPos.MutableBlockPos(); BlockPos firstBlock = null; - HashMap chunkSet = new HashMap<>(); + HashMap chunkMap = new HashMap<>(); while (!todo.isEmpty()) { var pair = todo.pop(); @@ -123,21 +124,22 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, BlockState hereBs; var chunkPos = new ChunkPos(herePos); - if (!chunkSet.containsKey(chunkPos)) { - var z = level.getChunkSource().getChunkFuture(chunkPos.x,chunkPos.z, ChunkStatus.EMPTY,true); + if (!chunkMap.containsKey(chunkPos)) { // Have we found/loaded this chunk yet? + var z = level.getChunkSource().getChunkFuture(chunkPos.x,chunkPos.z, ChunkStatus.EMPTY,true); // For some reason, loads almost no chunks try { - if (z.get().left().isPresent()){ - chunkSet.put(chunkPos,z.get().left().get()); + if (z.get().left().isPresent()){ // Has the Future computed yet? + chunkMap.put(chunkPos,z.get().left().get()); hereBs = z.get().left().get().getBlockState(herePos); - } else { + } else { // If the future has not been somehow, run normal getBlockState hereBs = level.getLevel().getBlockState(herePos); } - } catch (InterruptedException | ExecutionException e) { + } catch (InterruptedException | ExecutionException e) { // If something goes *wrong*, run normal getBlockState hereBs = level.getLevel().getBlockState(herePos); } - } else { - hereBs = chunkSet.get(chunkPos).getBlockState(herePos); + } else { // Oh good! We found this chunk already, get it from the HashMap + hereBs = chunkMap.get(chunkPos).getBlockState(herePos); } + if (!(hereBs.getBlock() instanceof ICircleComponent cmp)) { continue; } @@ -162,12 +164,17 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, if (herePos.getZ() > positiveBlock.getZ()) positiveBlock.setZ(herePos.getZ()); if (herePos.getZ() < negativeBlock.getZ()) negativeBlock.setZ(herePos.getZ()); - // it's new + // It's new var outs = cmp.possibleExitDirections(herePos, hereBs, level); for (var out : outs) { 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 (firstBlock == null) { From bd3b424e3bbbc4f04912392bbee794e60a492d0a Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 13 Jul 2025 15:53:26 -0400 Subject: [PATCH 15/18] Added Spell Circle error messages --- .../hexcasting/api/casting/circles/ICircleComponent.java | 2 ++ .../casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java index 66e06b4d0d..315342d6f5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java @@ -151,6 +151,8 @@ default void fakeThrowMishap(BlockPos pos, BlockState bs, CastingImage image, Ci var sideEffect = new OperatorSideEffect.DoMishap(mishap, errorCtx); var vm = new CastingVM(image, env); sideEffect.performEffect(vm); + if (env.getImpetus() != null) + env.getImpetus().postMishap(mishap.errorMessageWithName(env,errorCtx)); } abstract sealed class ControlFlow { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt index ae27403f23..f3a0b7f959 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt @@ -4,6 +4,8 @@ import at.petrak.hexcasting.api.casting.eval.CastingEnvironment import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.mishaps.Mishap import at.petrak.hexcasting.api.pigment.FrozenPigment +import at.petrak.hexcasting.api.utils.withStyle +import net.minecraft.ChatFormatting import net.minecraft.core.BlockPos import net.minecraft.network.chat.Component import net.minecraft.world.item.DyeColor @@ -20,5 +22,5 @@ class MishapBoolDirectrixEmptyStack( } override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context): Component = - error("circle.bool_directrix.empty_stack", pos.toShortString()) + error("circle.bool_directrix.empty_stack", pos.toShortString().withStyle(ChatFormatting.RED)) } \ No newline at end of file From 79e7aebaa9a015703be97594a057630fdd7c8747 Mon Sep 17 00:00:00 2001 From: Stickia Date: Sun, 13 Jul 2025 16:43:20 -0400 Subject: [PATCH 16/18] Cleaned up and generalized existing Spell Circle error messages --- .../hexcasting/api/casting/circles/ICircleComponent.java | 4 ++-- .../mishaps/circle/MishapBoolDirectrixEmptyStack.kt | 4 ++-- .../casting/mishaps/circle/MishapBoolDirectrixNotBool.kt | 5 ++++- .../resources/assets/hexcasting/lang/en_us.flatten.json5 | 8 ++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java index 315342d6f5..f59391da59 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/ICircleComponent.java @@ -11,10 +11,10 @@ import at.petrak.hexcasting.common.lib.HexItems; import at.petrak.hexcasting.common.lib.HexSounds; import com.mojang.datafixers.util.Pair; +import net.minecraft.ChatFormatting; import net.minecraft.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundSource; import net.minecraft.util.Mth; @@ -147,7 +147,7 @@ static void sfx(BlockPos pos, BlockState bs, Level world, BlockEntityAbstractImp */ default void fakeThrowMishap(BlockPos pos, BlockState bs, CastingImage image, CircleCastEnv env, Mishap mishap) { Mishap.Context errorCtx = new Mishap.Context(null, - bs.getBlock().getName().append(" (").append(Component.literal(pos.toShortString())).append(")")); + bs.getBlock().getName().withStyle(ChatFormatting.LIGHT_PURPLE)); var sideEffect = new OperatorSideEffect.DoMishap(mishap, errorCtx); var vm = new CastingVM(image, env); sideEffect.performEffect(vm); diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt index f3a0b7f959..b9563285b1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixEmptyStack.kt @@ -4,7 +4,6 @@ import at.petrak.hexcasting.api.casting.eval.CastingEnvironment import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.mishaps.Mishap import at.petrak.hexcasting.api.pigment.FrozenPigment -import at.petrak.hexcasting.api.utils.withStyle import net.minecraft.ChatFormatting import net.minecraft.core.BlockPos import net.minecraft.network.chat.Component @@ -22,5 +21,6 @@ class MishapBoolDirectrixEmptyStack( } override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context): Component = - error("circle.bool_directrix.empty_stack", pos.toShortString().withStyle(ChatFormatting.RED)) + error("circle.empty_stack", 1, + Component.literal("(").append(pos.toShortString()).append(")").withStyle(ChatFormatting.RED)) } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixNotBool.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixNotBool.kt index 7c3d7b1fb5..cc5a1ec897 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixNotBool.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/circle/MishapBoolDirectrixNotBool.kt @@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.casting.eval.CastingEnvironment import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.mishaps.Mishap import at.petrak.hexcasting.api.pigment.FrozenPigment +import net.minecraft.ChatFormatting import net.minecraft.core.BlockPos import net.minecraft.network.chat.Component import net.minecraft.world.item.DyeColor @@ -21,5 +22,7 @@ class MishapBoolDirectrixNotBool( } override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context): Component = - error("circle.bool_directrix_no_bool", pos.toShortString(), perpetrator.display()) + error("circle.invalid_value", "boolean", 0, + Component.literal("(").append(pos.toShortString()).append(")").withStyle(ChatFormatting.RED), + perpetrator.display()) } \ No newline at end of file diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index 86c043ce36..ebb2891e8c 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -1105,10 +1105,10 @@ sapling: "a sapling", replaceable: "somewhere to place a block", }, - - "circle.bool_directrix": { - no_bool: "the iota encountered at %s was %s, not a bool", - empty_stack: "the stack was empty at %s", + + circle: { + empty_stack: "expected %s or more arguments but the stack was empty at %s", + invalid_value: "expected %s at index %s of the stack at %s, but got %s" }, }, // ^ mishap From 18b63177df1ab9de6d689aeff52cd8c88e3bfd87 Mon Sep 17 00:00:00 2001 From: Stickia Date: Mon, 14 Jul 2025 00:00:20 -0400 Subject: [PATCH 17/18] Fixed small problems --- .../api/casting/circles/CircleExecutionState.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index eb1c3978d7..9761f68f18 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -56,7 +56,7 @@ public class CircleExecutionState { public @Nullable UUID caster; public @Nullable FrozenPigment casterPigment; // This controls the speed of the current slate - public Long reachedSlate; + public long reachedSlate; // Tracks the highest pos, and lowest pos of the AABB public BlockPos positivePos; @@ -116,7 +116,6 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, BlockPos firstBlock = null; HashMap chunkMap = new HashMap<>(); while (!todo.isEmpty()) { - var pair = todo.pop(); var enterDir = pair.getFirst(); var herePos = pair.getSecond(); @@ -294,7 +293,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { executorBlockState = executor.startEnergized(this.currentPos, executorBlockState, world); this.reachedPositions.add(this.currentPos); - this.reachedSlate = this.reachedSlate +1; + this.reachedSlate +=1; // Do the execution! boolean halt = false; @@ -321,7 +320,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { Component.literal(this.currentPos.toShortString()).withStyle(ChatFormatting.RED)), new ItemStack(Items.COMPASS)); ICircleComponent.sfx(this.currentPos, executorBlockState, world, - Objects.requireNonNull(env.getImpetus()), false); + Objects.requireNonNull(env.getImpetus()), false); halt = true; break; } else { @@ -353,7 +352,7 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { * How many ticks should pass between activations, given the number of blocks encountered so far. */ protected int getTickSpeed() { - return Math.toIntExact(Math.max(2, 10 - (this.reachedSlate - 1) / 3)); + return (int) Math.max(2, 10 - (this.reachedSlate - 1) / 3); } public void endExecution(BlockEntityAbstractImpetus impetus) { From 2e5ae96bc7897a00cfc9c86517d9dfbd18bc9e56 Mon Sep 17 00:00:00 2001 From: Stickia Date: Tue, 15 Jul 2025 12:10:57 -0400 Subject: [PATCH 18/18] Started work on ChunkScanning.kt --- .../casting/circles/CircleExecutionState.java | 31 +++----- .../hexcasting/api/utils/ChunkScanning.kt | 70 +++++++++++++++++++ 2 files changed, 78 insertions(+), 23 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/utils/ChunkScanning.kt diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 9761f68f18..cbc0a5499a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -6,6 +6,7 @@ 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.ChunkScanning; import at.petrak.hexcasting.api.utils.HexUtils; import com.mojang.datafixers.util.Pair; import net.minecraft.ChatFormatting; @@ -19,15 +20,10 @@ import net.minecraft.server.level.*; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraft.world.level.ChunkPos; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.chunk.ChunkAccess; -import net.minecraft.world.level.chunk.ChunkStatus; import net.minecraft.world.phys.AABB; import org.jetbrains.annotations.Nullable; import java.util.*; -import java.util.concurrent.ExecutionException; /** * See {@link BlockEntityAbstractImpetus}, this is what's stored in it @@ -113,30 +109,17 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, var positiveBlock = new BlockPos.MutableBlockPos(); var negativeBlock = new BlockPos.MutableBlockPos(); var lastBlockPos = new BlockPos.MutableBlockPos(); + var scanning = new ChunkScanning(level); BlockPos firstBlock = null; - HashMap chunkMap = new HashMap<>(); + while (!todo.isEmpty()) { var pair = todo.pop(); var enterDir = pair.getFirst(); var herePos = pair.getSecond(); + var hereBs = scanning.getBlock(herePos); - BlockState hereBs; - var chunkPos = new ChunkPos(herePos); - - if (!chunkMap.containsKey(chunkPos)) { // Have we found/loaded this chunk yet? - var z = level.getChunkSource().getChunkFuture(chunkPos.x,chunkPos.z, ChunkStatus.EMPTY,true); // For some reason, loads almost no chunks - try { - if (z.get().left().isPresent()){ // Has the Future computed yet? - chunkMap.put(chunkPos,z.get().left().get()); - hereBs = z.get().left().get().getBlockState(herePos); - } else { // If the future has not been somehow, run normal getBlockState - hereBs = level.getLevel().getBlockState(herePos); - } - } catch (InterruptedException | ExecutionException e) { // If something goes *wrong*, run normal getBlockState - hereBs = level.getLevel().getBlockState(herePos); - } - } else { // Oh good! We found this chunk already, get it from the HashMap - hereBs = chunkMap.get(chunkPos).getBlockState(herePos); + if (hereBs == null){ + continue; } if (!(hereBs.getBlock() instanceof ICircleComponent cmp)) { @@ -175,6 +158,8 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, return new Result.Err<>(null); } } + // Maybe not required, but still seems like a good idea + scanning.clearCache(); if (firstBlock == null) { return new Result.Err<>(null); diff --git a/Common/src/main/java/at/petrak/hexcasting/api/utils/ChunkScanning.kt b/Common/src/main/java/at/petrak/hexcasting/api/utils/ChunkScanning.kt new file mode 100644 index 0000000000..c251f917e0 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/utils/ChunkScanning.kt @@ -0,0 +1,70 @@ +package at.petrak.hexcasting.api.utils + +import at.petrak.hexcasting.api.HexAPI +import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap +import net.minecraft.core.BlockPos +import net.minecraft.server.level.ServerLevel +import net.minecraft.world.level.ChunkPos +import net.minecraft.world.level.block.entity.BlockEntity +import net.minecraft.world.level.block.state.BlockState +import net.minecraft.world.level.chunk.ChunkStatus +import net.minecraft.world.level.chunk.ImposterProtoChunk + +/** + * This is a helper class to efficiently scan chunks in ways Minecraft did not intend for. This is for only reading chunks, not writing + * + * TODO: MAKE DOC THIS BETTER + */ +class ChunkScanning(var level: ServerLevel) { + var chunks: Long2ObjectLinkedOpenHashMap = Long2ObjectLinkedOpenHashMap() + + /** + * This attempts to cache a chunk to the local [chunks] + * @param ChunkPos the chunk to try to cache + * @return If the function could cache the chunk or not + */ + fun cacheChunk(chunk: ChunkPos): Boolean { + val chunkLong = chunk.toLong() + // We have the chunk already, so we can skip it + if (chunks.contains(chunkLong)){ + return true + } + val future = level.chunkSource.getChunkFuture(chunk.x,chunk.z, ChunkStatus.EMPTY,true).get() + if (future.left().isPresent){ + chunks.put(chunkLong, future.left().get() as ImposterProtoChunk) + return true + } + HexAPI.LOGGER.warn("Failed to get chunk at {}!",chunk) + return false + } + + fun cacheChunk(chunk: Long): Boolean{ + return cacheChunk(ChunkPos(chunk)) + } + + fun getBlock(blockPos: BlockPos): BlockState? { + val chunkPos = ChunkPos(blockPos).toLong() + if (!cacheChunk(chunkPos)){ + return null + } + return chunks.get(chunkPos).getBlockState(blockPos) + } + + fun getBlockEntity(blockPos: BlockPos): BlockEntity? { + val chunkPos = ChunkPos(blockPos).toLong() + if (!cacheChunk(chunkPos)){ + return null + } + return chunks.get(chunkPos).getBlockEntity(blockPos) + } + + // maybe not required, but still not a bad idea to have a Clear method + fun clearCache(){ + chunks.clear() + } + + // TODO: Might not need this + fun containsChunk(chunk: ChunkPos): Boolean{ + return chunks.contains(chunk.toLong()) + } +} \ No newline at end of file