Skip to content

Commit

Permalink
Merge McMergeface
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarWitch7 committed Nov 1, 2024
2 parents 7eef544 + 7fdcdc0 commit a185beb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
11 changes: 1 addition & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
- 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)
- Undid Sodium compat changes temporarily due to a crash on world load. (@enjarai)
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps.yarn=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version=2.0.0-alpha.37
mod_version=2.0.0-alpha.39
maven_group=dev.enjarai
archives_base_name=trickster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockState> original, @Share("shadow_map") LocalRef<ShadowDisguiseMapComponent> 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<BlockState> original, @Share("shadow_map") LocalRef<ShadowDisguiseMapComponent> shadowMap) {
// var customState = shadowMap.get().getFunnyState(blockX, blockY, blockZ);
// return customState != null ? customState : original.call(instance, blockX, blockY, blockZ);
// }
}
2 changes: 1 addition & 1 deletion src/main/java/dev/enjarai/trickster/spell/Fragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Fragment> ENDEC = EndecTomfoolery.lazy(() -> (StructEndec<Fragment>) Endec.dispatchedStruct(
FragmentType::endec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ public Fragment activate(SpellContext ctx, List<Fragment> fragments) throws Blun
}

var squaredRange = range * range;

var entities = new ArrayList<Entity>();
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()
Expand Down

0 comments on commit a185beb

Please sign in to comment.