Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JasperLorelai/921f395d7b429bce248162e2d8130030 to your computer and use it in GitHub Desktop.
Save JasperLorelai/921f395d7b429bce248162e2d8130030 to your computer and use it in GitHub Desktop.

Note

  • 4.0 Beta 14 only supports 1.20.4.
  • All changes are already on the Wiki

Table Of Contents:


Additions:

  • Added meta variables:
    • Freeze/Fire tick:
      • meta_freeze_ticks
      • meta_max_freeze_ticks
      • meta_max_fire_ticks
    • Vehicle movement:
      • meta_forwards_movement
      • meta_sideways_movement
    • Hunger mechanics:
      • meta_exhaustion
      • meta_starvation_rate
      • meta_saturated_regen_rate
      • meta_unsaturated_regen_rate
    • Other: meta_respawn_location_(x/y/z)
  • Added min-horizontal-radius and min-vertical-radius to the AreaEffectSpell.
  • Added data elements for the DataSpell:
    • lastdamagecause.attacker - returns the entity's Entity Name.
    • clientbrandname - Returns the entity's Client Brand Name.
    • location.light
    • location.light.blocks
    • location.light.sky
  • Added PlayerMenuSpell options spell-drop and spell-swap.
  • Added custom recipe category option:
  • Entity and block/location target checks now take into account accurate hitboxes and shapes of entities/blocks.
    • Added the los-ray-size option to general.yml and spell options. Defaults to 0.2. Determines the size of the ray used for checking line of sight to entities when retrieving an entity target.
    • Added the los-ignore-passable-blocks option to general.yml and spell options. Defaults to true. When true, passable blocks (blocks that do not have any colliding parts that stop movement) are ignored for entity/location targeting. For example, air and tall grass are passable.
    • Added the los-fluid-collision-mode option to general.yml and spell options. Defaults to never, and has the values always, never and source_only as according to here. Determines whether or not fluids are collided with when retrieving entity/location targets.
    • los-transparent-blocks now defaults to an empty list. The AIR, CAVE_AIR and VOID_AIR are still automatically added to an empty list for los-transparent-blocks, however.
    • Note: some spells still do not take into account accurate collision shapes. These spells include, but are not limited to, BeamSpell, BlockBeamSpell, and HomingMissileSpell.
  • Magic items now support the external::vanilla serialization type. This format for items is the same as the vanilla /give command.
  • Added modifier conditions:
    • Location:
      • buildable
      • burnable
      • collidable
      • passable
      • replaceable
      • solid
      • blocktag - Passes if the checked block has at least one of the specified block tags. ConditionVar is a comma-separated list of block tags.
    • Entity:
      • pose - Takes a comma separated list of poses.
      • fixedpose
      • silent
      • clientname - Compares Client Brand Name. ConditionVar should be the name to compare to for the condition to pass.
      • pulseractive and totemactive - Checks how many pulsers/totems the target has, respectively. Operator and value are optional. Examples:
        • totemactive totem-spell>4 denied
        • pulseractive pulser-spell required
      • attribute - Compares the current value of the specified attribute. ConditionVar has a format of [attribute name][operator][number]
      • attributebase - Compares the base value of the specified attribute. ConditionVar has a format of [attribute name][operator][number]
      • attributedefault - Compares the default value of the specified attribute. ConditionVar has a format of [attribute name][operator][number]
      • cast - Passes if the sub-spell specified in the ConditionVar casts successfully.
      • entitytypetag - Passes if the checked entity has at least one of the specified entity type tags. ConditionVar is a comma-separated list of entity type tags.
      • climbing
      • leashed
      • sleeping
      • underwater
  • Added ProjectileSpell and HomingProjectileSpell option arrow-color.
  • Added the land-spell option to FlightPathSpell. Casted when the path is completed after landing.
  • Added PassiveSpell triggers:
    • startpose/stoppose - Takes a comma separated list of poses.
    • insideblock - Triggers when an entity enters a block as specified here. Takes a comma separated list of block data.
    • portalenter and portaleave - Fires when an entity enters/exists a portal created by PortalSpell. TriggerVar supports a string-based spell filter.
  • Added new spells:
  • Added new spell effects:
  • Added the visible, charged, and incendiary options to HomingProjectileSpell, now matching ProjectileSpell.
  • Added freeze to the valid options in the remove option for CleanseSpell.
  • Added /ms util listgoals [uuid] command for listing mob goals of an entity.
  • Added store-chat-output (Variable name) to ExternalCommandSpell - requires ProtocolLib.
  • Added the %r placeholder. Replaces to the name of the recipient of a message or action. By default the recipient is the same entity as the caster. If used in a message, the recipient is the reciever of the message; similarly, the recipient in a buff spell is the receiver of the buff, instead of the caster.
  • The %a, %t, and %r placeholders are now supported universally for string expressions.
  • Options that took particle name now support resource locations.
  • Added the spell-on-death option to SpawnEntitySpell. Specifies a sub-spell to cast when the spawned entity dies.
  • Added the spell-on-target option to SpawnEntitySpell. Specifies a sub-spell to cast when the spawned entity changes target.
  • Added the str-cast-cancelled option to general spell configuration. Supports rich text. Sent whenever a spell cast is cancelled, and is mostly helpful for debugging.
  • Added the following options to the itemspray effect:
    • gravity - controls whether the items have gravity. Defaults to true.
    • remove-item-friction - removes the items' friction if true. Defaults to false.
    • resolve-duration-per-item - controls if the duration option is resolved multiple times per item spawned. Defaults to false.
    • velocity - controls the velocity of the spawned items. Value is multiplied by the force option before being applied. Defaults to {x: rand(-0.5, 0.5), y: rand(-0.5, 0.5), z: rand(-0.5, 0.5)}.
  • Added the interactions option to OrbitSpell. Interaction configuration has been expanded as well.
  • OrbitSpell now supports tilted orbits. The following options enable this functionality:
    • start-pitch-offset - offset in degrees for the start pitch of the orbit. Defaults to 0.
    • start-yaw-offset - offset in degrees for the start yaw of the orbit. Renamed from start-horiz-offset. Defaults to 0.
    • start-angle-offset - offset in degrees for the starting angle of the orbit. Positive values follow in the direction of the orbit. Defaults to 0.
    • lock-start-yaw - if true, the starting yaw is locked to 0 before offsets. When false, the start yaw is derived from the starting location. Defaults to false.
    • lock-start-pitch - if true, the starting pitch is locked to 0 before offsets. When false, the start pitch is derived from the starting location. Defaults to true.
    • follow-pitch - if true, the orbit's pitch is changed to following pitch changes from the targeted entity. Defaults to false.
  • Added the immune-ticks option to OrbitSpell. If immune-ticks >= 0, entities hit by the orbit are immune from collisions for the amount of ticks specified by the option. Defaults to -1.
  • Added the constant-immune-ticks option to OrbitSpell. If false, immune-ticks is resolved per hit entity, instead of once at the start of the orbit. Defaults to true.
  • Added the flat-modifier, constant-flat-modifier, and power-affects-flat-modifier options to ResistSpell. flat-modifier applies a flat modifier to damage. Defaults to 0, true, and true respectively.
  • Added the flat-modifier and constant-flat-modifier options to DamageEmpowerSpell. flat-modifier applies a flat modifier to damage. Defaults to 0 and true, respectively.
  • Added the following options to entity data:
    • teleport-duration - integer. Option for Display entity.
    • ai - boolean. Controls if the entity has AI enabled. Applies only to mobs.
    • gravity - boolean. Controls if the entity has gravity.
    • silent - boolean. Controls if the entity is silent.
    • velocity - vector. Sets the velocity of the entity.
    • pickup-delay - integer. Sets the delay in ticks before an item can be picked up. Applies only to items.
    • can-mob-pickup - boolean. Sets if a mob can pick up an item. Applies only to items.
    • can-player-pickup - boolean. Sets if a player can pick up an item. Applies only to items.
    • interaction-height - float. Applies only to interaction entities.
    • interaction-width - float. Applies only to interaction entities.
    • responsive - boolean. Sets if this interaction entity should trigger a response when interacted with.
    • will-age - boolean. Sets if an item will age. Items that reach their maximum age despawn. Applies only to items.
    • scoreboard-tags - string list. List of string expressions to be applied as scoreboard tags.
    • equipment - configuration section. Has the following two sets of options.
      • main-hand, off-hand, helmet, chestplate, leggings, and boots - string-based magic item. Sets the item equipped to the options' respective slot. Applies to living entities.
      • main-hand-drop-chance, off-hand-drop-chance, helmet-drop-chance, chestplate-drop-chance, leggings-drop-chance, and boots-drop-chance - float. Sets the drop chances for the options' respective equipment slots, as mentioned here. Applies to mobs.
    • delayed-entity-data - section list. Specifies a list of delayed modifications to entity data.
  • Added cast command tab completion for spell cast arguments to: AdminTeachSpell, BindSpell, ForgetSpell, HelpSpell, ImbueSpell, KeybindSpell, ListSpell, ScrollSpell, SpellbookSpell, SublistSpell, TeachSpell, TomeSpell, UnbindSpell, EnderchestSpell, RecallSpell, and SummonSpell.
  • Added support for passing the -p: spell power flag and spell cast arguments using the /ms cast on command.
  • Added interrupt-filter config spell filter option to base spell options for cast-time when interrupt-on-cast is true. When empty, it allows all spells to interrupt cast time like before.

Client Brand Name:

If the client didn't send this information, the brand name will be null (empty with the data element). For the Notchian client this name defaults to vanilla. Some modified clients report other names such as forge & fabric.


Changes:

  • MenuSpell and PlayerMenuSpell will now close the inventories when the plugin reloads to avoid inventory modification.
  • Changed BuffManager's BuffMonitor to use Folia's global scheduler and replaced the ConcurrentHashMap with a regular HashMap.
  • Placeholders %a and %t now prioritise returning the non-player entity's display name before its configured name from entity-names in general.yml.
  • moonphase condition now accepts PaperMC's moon phases. Legacy grouped phases are still supported: full, waning, new, waxing.
  • string modifier action now supports string expressions.
  • signtext modifier condition format has changed (backwards compatible) to side;world,x,y,z,line__1\nline__2:
    • side; is optional and can be front; (default) or back;
    • world,x,y,z is also optional. If omitted, it'll use the caster's or target's location.
    • Text lines can be split by \\n or \n, spaces can be represented with __.
  • The title and author options of magic items now support MiniMessage.
  • ReachSpell now supports placing blocks in blocks tagged as replaceable, instead of just air blocks.
  • BuildSpell and PulserSpell now check if the block they attempt to set is placeable in the target location.
  • Ender dragon targeting now checks the hitboxes of its individual parts, rather than its hitbox.
  • The location option of LocationSpell now supports expressions.
  • The CleanseSpell option remove now supports specifying string-based spell filters for the respective spell types.
  • Spell options that check a valid target list can now specify specific gamemodes. When listed, players in that gamemode will be valid targets for these spells. This does not change the behavior of the player/players options, which still only allow players in adventure and survival.
  • /ms cast as and /ms cast on will now return the UUID/username of the ray-traced target first.
  • The totems and pulsers of TotemSpell and PulserSpell now tick individually. As such, the interval options on both spells now support replacement.
  • The loopactive and ownedloopactive conditions now allow optionally specifying an operator and value. Example: loopactive loop-spell>1 denied.
  • The self/caster target element of valid target lists now passes regardless of gamemode.
  • .targeted.CarpetSpell can now hit non-player entities.
  • The variablestringequals modifier condition now supports = in addition to : as a separator.
  • PassiveSpell will now always play spell effects, regardless of if the spells option is empty.
  • InvisibilitySpell can now be casted by non-player entities.
  • The invisible/invisibles target element of valid target lists now also applies to non-players.
  • The ground collision checks of ParticleProjectileSpell are, in general, more accurate.
    • Ground collisions now account for accurate block and fluid shapes. As a result, the ground hit radius is in a sense smaller because it was bigger than it should be. To accompany these improvements, the following options were added:
      • ignore-passable-blocks - sets if the projectile ignores passable blocks. Defaults to true.
      • fluid-collision-mode - sets how the projectile interacts with fluids. Takes the values specified here. Defaults to never.
    • The ground-hit-radius and ground-vertical-hit-radius are now floats, instead of integers.
    • The intermediate-hitboxes option of ParticleProjectileSpell now also checks for intermediate ground collisions.
  • Interactions betweeen ParticleProjectileSpell projectiles are now determined by if their hitboxes overlap, rather than if one of the hitboxes contains the center of the other.
  • The seconds-per-revolution option of OrbitSpell now supports a value of 0 for stationary orbits.
  • The start-horiz-offset option of OrbitSpell has been renamed to start-yaw-offset. Usages of the old name will continue to function.
  • Due to changes in how OrbitSpell calculates orbits, the seconds-per-revolution option is now rounded to the nearest tick-interval / 20 ticks. For example, with tick-interval: 1, 0.06 is rounded to 0.05, and with tick-interval: 10, 5.7 is rounded to 5.5.
  • The can-hit option of OrbitSpell now supports string-based valid target lists.
  • OrbitSpell entity collisions now properly consider entity hitboxes, rather than just checking their origin point.
  • The ParticleProjectileSpell option interactions has been expanded.
  • EnchantSpell and Magic Items now support non-minecraft resource locations for enchantments.
  • RecallSpell now has an alias option use-respawn-location for use-bed-location, because it actually uses the respawn location, including from respawn anchors.

Breaking Changes:

  • PlayerMenuSpell no longer has spell-middle because it can no longer be detected.
  • The potion-color option of magic items has been replaced by the color option, for consistency.
  • The potion-data option of magic items has been replaced by the potion-type option. The previous format, <potion type> [extended/upgraded], is now just <potion type>, as extended/upgraded potion types are now their own, separate values.
  • Removed the tippedarrow projectile type from ProjectileSpell. Use the new arrow-color instead.
  • You can no longer attempt to cancel the startswim and stopswim triggers, as this functionality has been broken.
  • ExternalCommandSpell no longer does %a and %t placeholder replacement when do-variable-replacement is false. This change was done to avoid conflicts with commands that utilise % in their syntax, such as WorldEdit.
  • ParticleProjectileSpell now correctlyy faces the starting direction instead of facing downwards with projectile-velocity: 0, which may cause issues with effects relying on the previously broken behaviour.
  • The PassiveSpell's spells option now uses the same behaviour for sub-spell casts as all other spells. This notably results in changes in behaviour when using a Buff spell or an ExternalCommandSpell with a passive trigger that provides an entity target, where it used the targeted and require-player-target options of each spell to determine if the spell cast was targeted.
  • meta_bed_location_(x/y/z) no longer returns/modifies the respawn location, but only returns the bed location of the bed the player is currently sleeping in. meta_respawn_location_(x/y/z) variables have been added instead because the previous variables were misleading, returning respawn locations from respawn anchors, beds, and the world.
  • cancel-on-spell-cast: true on Buff spells now causes the buff to cancel on all spell casts if the spell filter options are not specified.

Fixes:

  • Fixed an issue where spell-icon wasn't initializing the itemstack properly.
  • Fixed an issue where the subspells weren't initialized properly for MinionSpell.
  • Fixed onteam and onsameteam conditions requiring player targets.
  • Fixed SpawnEntitySpell throwing spawn chance errors when using non-Mob entities.
  • Fixed PlayerMenuSpell throwing errors when the opener clicked outside the inventory.
  • Fixed signtext modifier condition not comparing text properly.
  • Fixed an issue where location-modifiers for LoopSpell were checked after applying y-offset to the targeted location, instead of before.
  • Fixed an issue that allowed dragging items into menus created from MenuSpell and PlayerMenuSpell.
  • Fixed ConjureSpell's offhand: true giving duplicate items.
  • Fixed MultiSpell's enable-custom-spell-chance not calculating random spells correctly.
  • Fixed an issue where the /ms magicitem command modified the stored item stack version of a magic item.
  • Fixed an issue with the uuid option of magic items that could cause an error.
  • Fixed an issue that caused magic items using the name or lore options to match improperly.
  • Fixed an issue where FlamewalkSpell, MinionSpell, BeamSpell, BlockBeamSpell, FireballSpell, and OrbitSpell did not properly check the self and invisibles targeting categories.
  • Fixed an issue where HomingMissileSpell started facing in the wrong direction.
  • Fixed an issue that caused experience to be modified incorrectly by reagents, DrainlifeSpell, and the shop addon.
  • Fixed an issue that prevented spaces from being used when specifying magic item costs.
  • Fixed an issue that could potentially cause an error in ProjectileSpell and ParticleProjectileSpell.
  • Fixed various issues with the MenuSpell and PlayerMenuSpell, e.g. moving items from menus or items deleting when being shift-clicked into menus.
  • Fixed an issues where vehicles and passengers cancelled teleports relating to MinionSpell, WaterwalkSpell, WindwalkSpell, OrbitSpell and StunSpell.
  • Fixed an issue where the experience bar was not reset after a cast with use-exp-bar-as-cast-time-bar: true.
  • Fixed an issue where FlamewalkSpell did not properly check target modifiers.
  • Fixed an issue that displayed empty names for projectiles spawned by HomingProjectileSpell.
  • Fixed an issue that prevented the auto-equip option of ConjureSpell from auto-equipping non-armor items to the head and chest slots.
  • Fixed console command completion for some commands.
  • Fixed showing mana on the food bar so that food changes are fake and food levels aren't modified.
  • Fixed modifying global variables without a player.
  • Fixed RepairSpell saving the repaired chestplate into the helmet slot.
  • Fixed an issue that caused targeting to fail on players if can-target was not specified.
  • Fixed SilenceSpell overriding its targeting to always target players.
  • Fixed an issue that caused invalid entries in remove on CleanseSpell to cause an error.
  • Fixed NPE (error) caused by FlightPathSpell option land-spell not being specified.
  • Fixed ExternalCommandSpell option block-chat-output sending black lines without ProtocolLib present even when str-blocked-output is empty.
  • Fixed an issue that caused an error when using the modifiers option of mana.yml.
  • Fixed an issue that caused an error when casting TotemSpell if a targeted block could not be found.
  • Fixed several exploits related to the itemspray effect.
  • Fixed an issue where the spread and speed options of VolleySpell were not properly divided by 10.
  • Fixed an issue with the spells option of MultiSpell that caused an error when a sub-spell contained a :.
  • Fixed an issue where an error would occur if the entity effect did not spawn an entity due to invalid configuration.
  • Fixed an issue where entites spawned by the entity effect persisted if they unloaded.
  • Fixed an issue that prevented the spectator target element of valid target lists from functioning properly.
  • PassiveSpell, DowseSpell and .targeted.CarpetSpell now properly check can-target.
  • Fixed an issue with .targeted.CarpetSpell that caused non-full blocks to be replaced with air.
  • Fixed issues that caused the armorstand, effectlib, and entity effects that caused an error if the effects had failed chance or modifiers, or had configured delay.
  • Fixed an issue with the armorstand and entity effects that caused them to not be correctly displayed if the option delay was configured.
  • Fixed an issue that prevented negative values of money from functioning in spell costs.
  • Fixed an issue that prevented some placeholders from working in failure messages for target-modifiers.
  • Fixed several issues that prevented certain post cast operations from being performed, such as specific failure messages for sub-spells on cast mode full.
  • Fixed an issue that prevented cooldowns from being properly persisted between reloads and restarts despite cooldowns-persist-through-reload: true.
  • Fixed an issue with ProjectileSpell that caused projectile hits to not always be properly considered, such as if a fireball projectile hit an entity with fire resistance.
  • Fixed an issue that prevented replacement from properly functioning for spell effect offsets in the buff, orbit, and projectile effect positions.
  • Fixed an issue with the leaping and velocityactive conditions that caused them to not function properly.
  • Improved how we calculate rotations for: ParticleProjectileSpell, BeamSpell, and BlockBeamSpell.
  • Improved how we calculate relative-offset in spells and spell effects.
  • Fixed AreaScanSpell not casting its spell on blocks of scanned locations, but on the original target location.
  • Fixed using usage of placeholders %t and %a in the following modifier conditions: hasscoreboardtag, customname, and data.
  • Fixed PlayerMenuSpell checking player-modifiers as if the player that would show up in the menu was the caster instead of the target.
  • Fixed WaterwalkSpell not working on fluid blocks, such as kelp and sea grass.
  • Fixed an issue that caused an error if the namespace-key option was not specified in the boss-bar section of a variable.
  • Fixed an issue with the worldguard no magic zone type that caused zone checks to be incorrect if the region was re-defined.
  • Fixed some spells which accept spell names in their spell cast arguments not accepting internal spell names if the passed spell's name was defined. Full list: BindSpell, ForgetSpell, HelpSpell, ImbueSpell, ScrollSpell, SpellbookSpell, TeachSpell, TomeSpell, and UnbindSpell.
  • Fixed the default yaw and pitch passed to the /ms cast at command from the executor's location being reversed.
  • Fixed playeranimate only checking for main hand animations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment