Package com.binaris.wizardry.core
Interface IArtifactEffect
- All Known Implementing Classes:
AmuletPotentialEffect,ArcaneDefenseAmuletEffect,ArcaneFrostRingEffect,AutoShieldAmuletEffect,BanishingAmuletEffect,BattlemageRingEffect,ChannelingAmuletEffect,CombustionRingEffect,CondensingRingEffect,ConjurerRingEffect,ExtractionRingEffect,FeedingCharmEffect,FireCloakingAmuletEffect,FrostWardingAmuletEffect,FullMoonRingEffect,HungerCastingCharmEffect,LeechingRingEffect,LichAmuletEffect,LightningMeleeEffect,PaladinRingEffect,PoisonRingEffect,QuickArtifactEffect,RecoveryAmuletEffect,RingStormEffect,ShatteringRingEffect,SoulBindingRingEffect,TransienceAmuletEffect
public interface IArtifactEffect
Interface representing the effects of artifacts in the mod.
This provides methods that can be overridden to define custom behavior for artifacts based on events. These methods
are loaded by the
ArtifactItem class to register the effects
inside the event bus.
You have all the freedom to add a custom implementation of this interface for your own artifacts, but if you do so, you must ensure to load the events yourself.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonHurtEntity(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.LivingEntity damagedEntity, net.minecraft.world.damagesource.DamageSource source, com.google.common.util.concurrent.AtomicDouble amount, AtomicBoolean canceled, net.minecraft.world.item.ItemStack artifact) Called when the player is responsible for hurting an entity (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.default voidonKillEntity(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.LivingEntity deadEntity, net.minecraft.world.damagesource.DamageSource source, net.minecraft.world.item.ItemStack artifact) Called when the player is responsible for killing an entity (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.default voidonPlayerHurt(net.minecraft.world.entity.player.Player player, net.minecraft.world.damagesource.DamageSource source, com.google.common.util.concurrent.AtomicDouble amount, AtomicBoolean canceled, net.minecraft.world.item.ItemStack artifact) Called when the player is hurt (if player carries the artifact in their hotbar or accessories) to apply the artifact's effectdefault voidonSpellPostCast(SpellCastEvent.Post event, net.minecraft.world.item.ItemStack artifact) Called after a spell is cast (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.default voidonSpellPreCast(SpellCastEvent.Pre event, net.minecraft.world.item.ItemStack artifact) Called before a spell is cast (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.default voidonTick(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack artifact) Called when the player is responsible for killing an entity (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.
-
Method Details
-
onTick
default void onTick(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack artifact) Called when the player is responsible for killing an entity (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.- Parameters:
player- The player wearing the artifactlevel- The level the player is inartifact- The artifact stack
-
onKillEntity
default void onKillEntity(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.LivingEntity deadEntity, net.minecraft.world.damagesource.DamageSource source, net.minecraft.world.item.ItemStack artifact) Called when the player is responsible for killing an entity (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.- Parameters:
player- The player wearing the artifactdeadEntity- The entity that was killedsource- The damage sourceartifact- The artifact stack
-
onHurtEntity
default void onHurtEntity(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.LivingEntity damagedEntity, net.minecraft.world.damagesource.DamageSource source, com.google.common.util.concurrent.AtomicDouble amount, AtomicBoolean canceled, net.minecraft.world.item.ItemStack artifact) Called when the player is responsible for hurting an entity (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.- Parameters:
player- The player wearing the artifactdamagedEntity- The entity that was hurtsource- The damage sourceamount- The amount of damage (mutable)canceled- Whether the damage event has been canceledartifact- The artifact stack
-
onPlayerHurt
default void onPlayerHurt(net.minecraft.world.entity.player.Player player, net.minecraft.world.damagesource.DamageSource source, com.google.common.util.concurrent.AtomicDouble amount, AtomicBoolean canceled, net.minecraft.world.item.ItemStack artifact) Called when the player is hurt (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect- Parameters:
player- The player wearing the artifactsource- The damage sourceamount- The amount of damage (mutable)canceled- Whether the damage event has been canceledartifact- The artifact stack
-
onSpellPreCast
Called before a spell is cast (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.- Parameters:
event- The spell cast eventartifact- The artifact stack
-
onSpellPostCast
default void onSpellPostCast(SpellCastEvent.Post event, net.minecraft.world.item.ItemStack artifact) Called after a spell is cast (if player carries the artifact in their hotbar or accessories) to apply the artifact's effect.- Parameters:
event- The spell cast eventartifact- The artifact stack
-