PortalSpell - TheComputerGeek2/MagicSpells GitHub Wiki
spell-class: ".instant.PortalSpell"
Spell Effect Positions:
special
- Plays the effect at both portal's locations.delayed
- Plays the effect at the start and end portal locations when the portal duration ends.
Description:
Opens a portal to your Mark spell's location for a short time, which can be used multiple times by other players.
Configuration:
Option | Description | Type | Default | Supports expressions |
---|---|---|---|---|
mark-spell |
Internal name of the mark spell. | String | false |
|
second-mark-spell |
Internal name of the second mark spell, if it's empty, it's going to use the caster's current location. | String | false |
|
teleport-cost |
Cost of each teleportation, reagent list. | String List | false |
|
duration |
Duration of the portal (in ticks). | Integer | 400 |
true |
min-distance |
Minimum distance between the marks. | Integer | 10 |
true |
max-distance |
Maximum distance between the marks. | Integer | 0 |
true |
effect-interval |
Interval between playing effects at the portal's location (in ticks). | Integer | 10 |
true |
teleport-cooldown |
Cooldown before each teleportation (in seconds). | Double | 5 |
true |
start-teleport-cooldown |
Since 4.0 Beta 13. Modify the teleport cooldown at the start of the portal cast, usually for the purpose of removing it. | Double | teleport-cooldown |
true |
vert-radius |
Vertical radius of the portal. | Float | 1 |
true |
horiz-radius |
Horizontal radius of the portal. | Float | 1 |
true |
allow-return |
Whether players can return back through the portal. | Boolean | true |
true |
teleport-other-players |
Whether other players can access the portal. | Boolean | true |
true |
charge-cost-to-teleporter |
Whether teleporting other players should charge them with teleport-cost. | Boolean | false |
true |
str-no-mark |
Message displayed when the mark-spell doesn't have a marked location. |
Rich Text | "You have not marked a location to make a portal to." |
true |
str-too-far |
Message displayed when you are too far from the marked location. | Rich Text | "You are too far away from your marked location." |
true |
str-too-close |
Message displayed when you are too close to the marked location. | Rich Text | "You are too close to your marked location." |
true |
str-teleport-cost-fail |
Message displayed when you don't have enough reagents to pass through the portal. | Rich Text | true |
|
str-teleport-cooldown-fail |
Message displayed when your portal is on cooldown and you try to go through it. | Rich Text | true |
Example:
portal:
spell-class: ".instant.PortalSpell"
mark-spell: "mark"
duration: 400
teleport-cooldown: 1
min-distance: 10
max-distance: 0
allow-return: true
teleport-cost:
- mana 10
charge-cost-to-teleporter: false
effect-interval: 10
str-no-mark: "You have not marked a location to make a portal to."
str-too-close: "You are too close to your marked location."
str-too-far: "You are too far away from your marked location."
effects:
eff1:
position: special
effect: effectlib
height-offset: 1
effectlib:
class: SphereEffect
particle: VILLAGER_HAPPY
color: ffffff
radius: 1
particles: 20
iterations: 1
period: 1
visibleRange: 150