Handle entity collision during teleportation - #1088
Open
JasperLorelai wants to merge 5 commits into
Open
Conversation
Also added support to disable entity centering with "center-target".
This migration was added 10 years ago in 87364b2, but it can be removed now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addition:
EntombSpell- Addedcenter-target(Boolean, defaulting totrue) - If set tofalse, the Spell will not teleport the entity to center them in a symmetric bounding box. Instead, the blocks will be placed asymmetrically beyond the bounding box the entity occupies.BlinkSpell,ShadowstepSpell, andPhaseSpell:require-ground-distance, defaulting to0.snap-to-grounddefaults tofalse.SummonSpell- Addedrequire-ground-distance, defaulting to2to preserve old behaviour.TeleportSpell- Addedrequire-ground-distance, defaulting to0.require-ground-distance(Integer) - Enforces that there are non-passable blocks within the configured distance.0disables this requirement.snap-to-ground(Boolean) - Whentrue, the destination will be adjusted to be on the surface instead of mid-air.PhaseSpell:ignore-transparent-blocks(Boolean,falseby default), which configures whether to ignore all [transparent blocks](https://github.com/TheComputerGeek2/MagicSpells/wiki/Spell-Configuration#block-target) or justair.enter-blocksmaterial list, which tells the spell to pass to the "exit" stage after entering specific blocks. This is useful when you want to enter passable blocks, such ascobweb, whileignore-transparent-blocksistrue.air-only-exit(Boolean,trueby default), which only allowsairto be the exit location; otherwise it keeps phasing. Whenfalse, all passable blocks are valid exits.non-exit-blocks(material list) of explicitly disallowed passable exit blocks.Changes:
EntombSpellwill now surround the whole entity with blocks regardless of bounding box size, instead of always surrounding entities in a Player-sized box.DodgeSpell,GateSpell,BlinkSpell,ShadowstepSpell,SummonSpell,TeleportSpell, andPhaseSpell.Fixes:
EntombSpellwould teleport the player within a block if the target is not on a full block, causing them to clip into the block.