From 0c26954261f5b1f20c951a583d6a91eed784073a Mon Sep 17 00:00:00 2001 From: enjarai Date: Thu, 10 Oct 2024 23:37:44 +0200 Subject: [PATCH 1/5] Two orders of magnitude more weighty. Cause I'm nice :3 --- src/main/java/dev/enjarai/trickster/spell/Fragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/enjarai/trickster/spell/Fragment.java b/src/main/java/dev/enjarai/trickster/spell/Fragment.java index 97e82f5d..dc97173f 100644 --- a/src/main/java/dev/enjarai/trickster/spell/Fragment.java +++ b/src/main/java/dev/enjarai/trickster/spell/Fragment.java @@ -16,7 +16,7 @@ import java.util.function.BiFunction; public non-sealed interface Fragment extends SpellInstruction { - int MAX_WEIGHT = 6400; + int MAX_WEIGHT = 640000; @SuppressWarnings("unchecked") StructEndec ENDEC = EndecTomfoolery.lazy(() -> (StructEndec) Endec.dispatchedStruct( FragmentType::endec, From b64b24b061355553f1982bdf3c08a0935715a96b Mon Sep 17 00:00:00 2001 From: enjarai Date: Thu, 10 Oct 2024 23:53:15 +0200 Subject: [PATCH 2/5] Okay fine auri --- src/main/java/dev/enjarai/trickster/cca/ManaComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/enjarai/trickster/cca/ManaComponent.java b/src/main/java/dev/enjarai/trickster/cca/ManaComponent.java index 2f0dd28d..f6c162c4 100644 --- a/src/main/java/dev/enjarai/trickster/cca/ManaComponent.java +++ b/src/main/java/dev/enjarai/trickster/cca/ManaComponent.java @@ -115,7 +115,8 @@ public boolean decrease(float amount) { super.decrease(amount); if (f < 0) { - ((DirectlyDamageDuck) entity).trickster$damageDirectly(ModDamageTypes.of(entity.getWorld(), ModDamageTypes.MANA_OVERFLUX), ManaPool.healthFromMana(f * -1)); +// ((DirectlyDamageDuck) entity).trickster$damageDirectly(ModDamageTypes.of(entity.getWorld(), ModDamageTypes.MANA_OVERFLUX), ManaPool.healthFromMana(f * -1)); + entity.damage(ModDamageTypes.of(entity.getWorld(), ModDamageTypes.MANA_OVERFLUX), ManaPool.healthFromMana(f * -1)); return entity.isAlive() && !((entity.getAttached(ModAttachments.WHY_IS_THERE_NO_WAY_TO_DETECT_THIS) instanceof Boolean b) && Boolean.TRUE.equals(b)); } From cb3664b51642e70ef1d8e42701ca750ee3353fcb Mon Sep 17 00:00:00 2001 From: enjarai Date: Thu, 10 Oct 2024 23:53:51 +0200 Subject: [PATCH 3/5] UpdatesTIME!! --- CHANGELOG.md | 23 +++++++++++++---------- gradle.properties | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 196194e8..ad5f16be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,13 @@ -- Added 16 colors of dyed spell scrolls. (@enjarai) -- Added two extra hat types. (@enjarai) - - These function exactly the same as the Top Hat, just with a different aesthetic. -- Added a third person animation when taking off and putting on a hat. (@enjarai) -- Added a HUD element showing the currently selected scroll when holding a hat in your offhand. (@enjarai) -- Generally polished hat interactions. -- Updated multiple textures courtesy of @Crephan. -- Fixed a bug letting players save ephemeral fragments within lists. (@enjarai) -- Tweaked how bloodcasting damage is applied, making it less forgiving. (@enjarai) -- Fixed a slight oddity in the spell editor, where one could interact with a fake root as if it is the real root. (@StellarWitch7) \ No newline at end of file +- Added Flecks, a way to display lines and other features in the world using spells. (@Vlue, @enjarai, @StellarWitch7) + - This system will be expanded upon in the future. +- Added scroll shelves, a way to nicely display and store scrolls in your base. (@enjarai) +- Implemented a weight system for fragments. (@enjarai) + - Overweight fragments may cause a spell to fail. + - Weight limits are set quite generously, and are subject to change based on feedback. +- Modified a bunch of trick signatures to be chainable. (@StellarWitch7) +- Fix being able to die from mana overuse in creative mode. (@enjarai) +- Fix scrolling in the hat ui only working for offhand hats. (@enjarai) +- Partially fixed compatibility with Sodium for shadow blocks. (@enjarai) + - Some behaviour is still inconsistent between vanilla and Sodium, but we plan to address this. +- Implemented a temporary solution for Surveyor (used by Antique Atlas) compat. (@enjarai) +- Added a keybind for modifying any spell on any item in creative mode. (@Awakened-Redstone) diff --git a/gradle.properties b/gradle.properties index ea470759..9e7dad64 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ deps.yarn=1.21+build.2 loader_version=0.15.11 # Mod Properties -mod_version=2.0.0-alpha.37 +mod_version=2.0.0-alpha.38 maven_group=dev.enjarai archives_base_name=trickster From cdbf360346893fad71f7828b5d244e0eeb656966 Mon Sep 17 00:00:00 2001 From: enjarai Date: Fri, 11 Oct 2024 08:16:15 +0200 Subject: [PATCH 4/5] Mfw --- CHANGELOG.md | 14 +---------- gradle.properties | 2 +- .../sodium/ChunkBuilderMeshingTaskMixin.java | 24 +++++++++---------- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad5f16be..590268ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1 @@ -- Added Flecks, a way to display lines and other features in the world using spells. (@Vlue, @enjarai, @StellarWitch7) - - This system will be expanded upon in the future. -- Added scroll shelves, a way to nicely display and store scrolls in your base. (@enjarai) -- Implemented a weight system for fragments. (@enjarai) - - Overweight fragments may cause a spell to fail. - - Weight limits are set quite generously, and are subject to change based on feedback. -- Modified a bunch of trick signatures to be chainable. (@StellarWitch7) -- Fix being able to die from mana overuse in creative mode. (@enjarai) -- Fix scrolling in the hat ui only working for offhand hats. (@enjarai) -- Partially fixed compatibility with Sodium for shadow blocks. (@enjarai) - - Some behaviour is still inconsistent between vanilla and Sodium, but we plan to address this. -- Implemented a temporary solution for Surveyor (used by Antique Atlas) compat. (@enjarai) -- Added a keybind for modifying any spell on any item in creative mode. (@Awakened-Redstone) +- Undid Sodium compat changes temporarily due to a crash on world load. (@enjarai) diff --git a/gradle.properties b/gradle.properties index 9e7dad64..f21bc6f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ deps.yarn=1.21+build.2 loader_version=0.15.11 # Mod Properties -mod_version=2.0.0-alpha.38 +mod_version=2.0.0-alpha.39 maven_group=dev.enjarai archives_base_name=trickster diff --git a/src/client/java/dev/enjarai/trickster/mixin/client/sodium/ChunkBuilderMeshingTaskMixin.java b/src/client/java/dev/enjarai/trickster/mixin/client/sodium/ChunkBuilderMeshingTaskMixin.java index eccbaeb9..7f7af06d 100644 --- a/src/client/java/dev/enjarai/trickster/mixin/client/sodium/ChunkBuilderMeshingTaskMixin.java +++ b/src/client/java/dev/enjarai/trickster/mixin/client/sodium/ChunkBuilderMeshingTaskMixin.java @@ -46,16 +46,16 @@ private void preGetComponent(ChunkBuildContext buildContext, CancellationToken c shadowMap.set(ModChunkComponents.SHADOW_DISGUISE_MAP.get(world.getChunk(render.getChunkX(), render.getChunkZ()))); } - @WrapOperation( - method = "execute(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;)Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;", - at = @At( - value = "INVOKE", - target = "Lnet/caffeinemc/mods/sodium/client/world/LevelSlice;getBlockState(III)Lnet/minecraft/block/BlockState;" - ), - remap = false - ) - private BlockState modifyBlockState(LevelSlice instance, int blockX, int blockY, int blockZ, Operation original, @Share("shadow_map") LocalRef shadowMap) { - var customState = shadowMap.get().getFunnyState(blockX, blockY, blockZ); - return customState != null ? customState : original.call(instance, blockX, blockY, blockZ); - } +// @WrapOperation( +// method = "execute(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;)Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;", +// at = @At( +// value = "INVOKE", +// target = "Lnet/caffeinemc/mods/sodium/client/world/LevelSlice;getBlockState(III)Lnet/minecraft/block/BlockState;" +// ), +// remap = false +// ) +// private BlockState modifyBlockState(LevelSlice instance, int blockX, int blockY, int blockZ, Operation original, @Share("shadow_map") LocalRef shadowMap) { +// var customState = shadowMap.get().getFunnyState(blockX, blockY, blockZ); +// return customState != null ? customState : original.call(instance, blockX, blockY, blockZ); +// } } From 7fdcdc03428c1d42176cd334b868649b970c8fd8 Mon Sep 17 00:00:00 2001 From: Aurora Dawn <131844170+StellarWitch7@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:47:33 -0400 Subject: [PATCH 5/5] I only want your head --- .../trickster/spell/trick/entity/RangeFindEntityTrick.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/enjarai/trickster/spell/trick/entity/RangeFindEntityTrick.java b/src/main/java/dev/enjarai/trickster/spell/trick/entity/RangeFindEntityTrick.java index c566bac6..6efe8cc2 100644 --- a/src/main/java/dev/enjarai/trickster/spell/trick/entity/RangeFindEntityTrick.java +++ b/src/main/java/dev/enjarai/trickster/spell/trick/entity/RangeFindEntityTrick.java @@ -35,14 +35,15 @@ public Fragment activate(SpellContext ctx, List fragments) throws Blun } var squaredRange = range * range; - var entities = new ArrayList(); - ctx.source().getWorld().collectEntitiesByType( + var world = ctx.source().getWorld(); + + world.collectEntitiesByType( filter, new Box( pos.x() - range, pos.y() - range, pos.z() - range, pos.x() + range, pos.y() + range, pos.z() + range ), - e -> e.getPos().squaredDistanceTo(pos.x(), pos.y(), pos.z()) <= squaredRange, entities + e -> e.getPos().squaredDistanceTo(pos.x(), pos.y(), pos.z()) <= squaredRange && world.getEntity(e.getUuid()) != null, entities ); return new ListFragment(entities.stream()