2023-01-20 20:27:35 +01:00
|
|
|
package at.petrak.hexcasting.api.casting.mishaps
|
2022-03-26 07:01:44 +01:00
|
|
|
|
2023-01-22 03:29:09 +01:00
|
|
|
import at.petrak.hexcasting.api.casting.eval.CastingEnvironment
|
2023-04-27 21:26:15 +02:00
|
|
|
import at.petrak.hexcasting.api.casting.iota.Iota
|
|
|
|
import at.petrak.hexcasting.api.pigment.FrozenPigment
|
2022-03-26 07:01:44 +01:00
|
|
|
import net.minecraft.world.item.DyeColor
|
|
|
|
|
2022-03-26 19:46:50 +01:00
|
|
|
/**
|
|
|
|
* this is bad
|
|
|
|
*/
|
2022-03-26 07:01:44 +01:00
|
|
|
class MishapInvalidSpellDatumType(val perpetrator: Any) : Mishap() {
|
2023-04-27 21:26:15 +02:00
|
|
|
override fun accentColor(ctx: CastingEnvironment, errorCtx: Context): FrozenPigment =
|
2022-03-26 07:01:44 +01:00
|
|
|
dyeColor(DyeColor.BLACK)
|
|
|
|
|
2023-01-22 03:29:09 +01:00
|
|
|
override fun execute(ctx: CastingEnvironment, errorCtx: Context, stack: MutableList<Iota>) {
|
2022-05-25 22:34:46 +02:00
|
|
|
// NO-OP
|
2022-03-26 07:01:44 +01:00
|
|
|
}
|
|
|
|
|
2023-01-22 03:29:09 +01:00
|
|
|
override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context) =
|
2022-03-26 07:01:44 +01:00
|
|
|
error("invalid_spell_datum_type", this.perpetrator.toString(), this.perpetrator.javaClass.typeName)
|
2022-04-12 21:13:51 +02:00
|
|
|
}
|