-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce036c0
commit fe8cd7c
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
common/src/main/java/miyucomics/hexical/casting/mishaps/GrimoireTooFullMishap.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package miyucomics.hexical.casting.mishaps | ||
|
||
import at.petrak.hexcasting.api.misc.FrozenColorizer | ||
import at.petrak.hexcasting.api.spell.ParticleSpray | ||
import at.petrak.hexcasting.api.spell.casting.CastingContext | ||
import at.petrak.hexcasting.api.spell.iota.Iota | ||
import at.petrak.hexcasting.api.spell.mishaps.Mishap | ||
import miyucomics.hexical.Hexical | ||
import net.minecraft.text.Text | ||
import net.minecraft.util.DyeColor | ||
import net.minecraft.util.Hand | ||
|
||
class GrimoireTooFullMishap : Mishap() { | ||
override fun accentColor(ctx: CastingContext, errorCtx: Context): FrozenColorizer = dyeColor(DyeColor.BLUE) | ||
override fun particleSpray(ctx: CastingContext) = ParticleSpray.burst(ctx.caster.pos, 1.0) | ||
override fun errorMessage(ctx: CastingContext, errorCtx: Context): Text = error(Hexical.MOD_ID + ":grimoire_too_full") | ||
|
||
override fun execute(ctx: CastingContext, errorCtx: Context, stack: MutableList<Iota>) { | ||
yeetHeldItem(ctx, Hand.OFF_HAND) | ||
} | ||
} |
This file contains 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
This file contains 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