Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Fixed

- Fixed Great Spells causing a mishap when drawn without enlightenment even while parenthesized ([#1290](https://github.com/FallingColors/HexMod/pull/1290)) @Robotgiggle
- Fixed Blink and Greater Teleport cancelling all velocity when cast on a player ([#1310](https://github.com/FallingColors/HexMod/pull/1310)) @drtheodor

## `0.11.4` - 2026-08-26

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ import at.petrak.hexcasting.api.casting.mishaps.MishapImmuneEntity
import at.petrak.hexcasting.api.misc.MediaConstants
import at.petrak.hexcasting.api.mod.HexConfig
import at.petrak.hexcasting.api.mod.HexTags
import at.petrak.hexcasting.xplat.IXplatAbstractions
import net.minecraft.core.BlockPos
import net.minecraft.server.level.ServerLevel
import net.minecraft.server.level.ServerPlayer
import net.minecraft.server.level.TicketType
import net.minecraft.world.entity.Entity
import net.minecraft.world.entity.RelativeMovement
import net.minecraft.world.item.enchantment.EnchantmentHelper
import net.minecraft.world.level.ChunkPos
import net.minecraft.world.phys.Vec3

// TODO while we're making breaking changes I *really* want to have the vector in the entity's local space
Expand Down Expand Up @@ -112,6 +109,10 @@ object OpTeleport : SpellAction {
teleportee.stopRiding()
if (!teleportee.type.`is`(HexTags.Entities.STICKY_TELEPORTERS))
teleportee.passengers.forEach(Entity::stopRiding)
teleportee.teleportTo(target.x, target.y, target.z)

// we specify that this is relative movement so that it doesn't reset player velocity. :mojank:
// note that the coordinates here are still absolute, because vanilla relative teleports are weird
teleportee.teleportTo(world, target.x, target.y, target.z,
RelativeMovement.ALL, teleportee.yRot, teleportee.xRot)
}
}
Loading