Class WerewolfPlayer

java.lang.Object
de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
de.teamlapen.werewolves.entities.player.werewolf.WerewolfPlayer
All Implemented Interfaces:
de.teamlapen.lib.lib.entity.IEntity, de.teamlapen.lib.lib.entity.IPlayerEventListener, de.teamlapen.lib.lib.storage.IAttachedSyncable, de.teamlapen.lib.lib.storage.IAttachment, de.teamlapen.lib.lib.storage.INBTObject, de.teamlapen.lib.lib.storage.ISavable, de.teamlapen.lib.lib.storage.ISyncable, de.teamlapen.lib.lib.storage.ISyncableSaveData, de.teamlapen.vampirism.api.entity.factions.IFactionEntity, de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>, de.teamlapen.vampirism.api.extensions.IEntity, de.teamlapen.vampirism.api.extensions.ILivingEntity, de.teamlapen.vampirism.api.extensions.IPlayer, de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer, de.teamlapen.werewolves.api.entities.werewolf.IWerewolf, de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class WerewolfPlayer extends de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer> implements de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
    static class 
     
  • Field Summary

    Fields inherited from class de.teamlapen.vampirism.entity.player.FactionBasePlayer

    player
  • Constructor Summary

    Constructors
    Constructor
    Description
    WerewolfPlayer(net.minecraft.world.entity.player.Player player)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    bite(int entityId)
     
    boolean
     
    boolean
    canBiteEntity(net.minecraft.world.entity.LivingEntity entity)
     
    boolean
     
    boolean
    canWearArmor(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, List<net.minecraft.world.item.ItemStack> stack)
     
    boolean
    canWearArmor(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, net.minecraft.world.item.ItemStack stack)
     
    boolean
    canWearArmor(List<net.minecraft.world.item.ItemStack> stacks)
     
    boolean
    canWearArmor(net.minecraft.world.item.ItemStack stack)
     
    void
    checkToolDamage(@NotNull net.minecraft.world.item.ItemStack from, @NotNull net.minecraft.world.item.ItemStack itemInHand, boolean forceCalculation)
     
    void
     
    void
    deserializeNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag nbt)
     
    void
    deserializeUpdateNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag nbt)
     
    void
     
    get(net.minecraft.world.entity.player.Player playerEntity)
     
    de.teamlapen.vampirism.api.entity.player.actions.IActionHandler<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
     
    net.minecraft.resources.ResourceLocation
     
    Optional<net.minecraft.world.item.Tier>
     
    float
     
    de.teamlapen.vampirism.api.entity.factions.IFaction<?>
     
    int
    getEyeType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
     
    de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm
     
     
     
     
    int
     
    Predicate<net.minecraft.world.entity.LivingEntity>
    getNonFriendlySelector(boolean otherFactionPlayers, boolean ignoreDisguise)
     
    getOpt(net.minecraft.world.entity.player.Player playerEntity)
    Deprecated.
    getOptEx(net.minecraft.world.entity.Entity entity)
    gets werewolf player optional
    getOptSave(net.minecraft.world.entity.player.Player player)
    Deprecated, for removal: This API element is subject to removal in a future version.
    @NotNull de.teamlapen.vampirism.api.entity.player.skills.ISkillHandler<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
     
    int
    getSkinType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
     
     
    boolean
    hasGlowingEyes(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
     
    boolean
    isAffectedByWolfsbane(net.minecraft.world.level.LevelAccessor accessor, boolean forceRefresh)
     
    boolean
     
     
    void
    onChangedDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> registryKey, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> registryKey1)
     
    void
    onDeath(net.minecraft.world.damagesource.DamageSource damageSource)
     
    boolean
    onEntityAttacked(net.minecraft.world.damagesource.DamageSource damageSource, float v)
     
    void
    onEntityKilled(net.minecraft.world.entity.LivingEntity victim, net.minecraft.world.damagesource.DamageSource src)
     
    void
     
    void
    onLevelChanged(int newLevel, int oldLevel)
     
    void
     
    void
     
    void
     
    void
    onUpdatePlayer(net.neoforged.neoforge.event.tick.PlayerTickEvent playerTickEvent)
     
    @NotNull net.minecraft.nbt.CompoundTag
    serializeNBT(net.minecraft.core.HolderLookup.Provider provider)
     
    @NotNull net.minecraft.nbt.CompoundTag
    serializeUpdateNBT(net.minecraft.core.HolderLookup.Provider provider)
     
    boolean
    setEyeType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, int type)
     
    void
    setForm(WerewolfFormAction action, de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
     
    boolean
    setGlowingEyes(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, boolean on)
     
    void
    setSkinData(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, int[] data)
     
    boolean
    setSkinType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, int type)
     
    void
    switchForm(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
     
    void
     
    void
    updateMinionAttributes(boolean increasedStats)
     

    Methods inherited from class de.teamlapen.vampirism.entity.player.FactionBasePlayer

    asEntity, getLevel, getRepresentingEntity, getRepresentingPlayer, getTaskManager, isRemote, sync, sync, syncProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.teamlapen.vampirism.api.entity.factions.IFactionEntity

    getRepresentingEntity

    Methods inherited from interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer

    asEntity, getFaction, getLevel, getRepresentingPlayer, getTaskManager, isRemote

    Methods inherited from interface de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder

    getEyeType, getSkinType, hasGlowingEyes

    Methods inherited from interface de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer

    getFaction
  • Constructor Details

    • WerewolfPlayer

      public WerewolfPlayer(@Nonnull net.minecraft.world.entity.player.Player player)
  • Method Details

    • get

      public static WerewolfPlayer get(@Nonnull net.minecraft.world.entity.player.Player playerEntity)
    • getOpt

      @Deprecated public static Optional<WerewolfPlayer> getOpt(@Nonnull net.minecraft.world.entity.player.Player playerEntity)
      Deprecated.
    • getOptSave

      @Deprecated(forRemoval=true) public static Optional<WerewolfPlayer> getOptSave(net.minecraft.world.entity.player.Player player)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getOptEx

      public static Optional<WerewolfPlayer> getOptEx(@Nullable net.minecraft.world.entity.Entity entity)
      gets werewolf player optional

      already filters if the entity is a werewolf player

    • getForm

      @Nonnull public de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm getForm()
      Specified by:
      getForm in interface de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder
    • setForm

      public void setForm(WerewolfFormAction action, de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
    • getInventory

      public WerewolfInventory getInventory()
    • switchForm

      public void switchForm(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
    • canWearArmor

      public boolean canWearArmor(net.minecraft.world.item.ItemStack stack)
      Specified by:
      canWearArmor in interface de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer
    • canWearArmor

      public boolean canWearArmor(List<net.minecraft.world.item.ItemStack> stacks)
    • canWearArmor

      public boolean canWearArmor(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, List<net.minecraft.world.item.ItemStack> stack)
    • canWearArmor

      public boolean canWearArmor(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, net.minecraft.world.item.ItemStack stack)
    • onChangedDimension

      public void onChangedDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> registryKey, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> registryKey1)
      Specified by:
      onChangedDimension in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • getSpecialAttributes

      @Nonnull public WerewolfPlayerSpecialAttributes getSpecialAttributes()
    • onUpdate

      public void onUpdate()
      Specified by:
      onUpdate in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
      Overrides:
      onUpdate in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • onUpdatePlayer

      public void onUpdatePlayer(net.neoforged.neoforge.event.tick.PlayerTickEvent playerTickEvent)
      Specified by:
      onUpdatePlayer in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • setGlowingEyes

      public boolean setGlowingEyes(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, boolean on)
    • setEyeType

      public boolean setEyeType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, int type)
    • setSkinType

      public boolean setSkinType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, int type)
    • setSkinData

      public void setSkinData(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form, int[] data)
    • onDeath

      public void onDeath(net.minecraft.world.damagesource.DamageSource damageSource)
      Specified by:
      onDeath in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
      Overrides:
      onDeath in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • getLevelHandler

      @Nonnull public LevelHandler getLevelHandler()
    • onEntityAttacked

      public boolean onEntityAttacked(net.minecraft.world.damagesource.DamageSource damageSource, float v)
      Specified by:
      onEntityAttacked in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • onEntityKilled

      public void onEntityKilled(net.minecraft.world.entity.LivingEntity victim, net.minecraft.world.damagesource.DamageSource src)
      Specified by:
      onEntityKilled in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • onJoinWorld

      public void onJoinWorld()
      Specified by:
      onJoinWorld in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • syncLevelHandler

      public void syncLevelHandler()
    • onPlayerLoggedIn

      public void onPlayerLoggedIn()
      Specified by:
      onPlayerLoggedIn in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • onPlayerLoggedOut

      public void onPlayerLoggedOut()
      Specified by:
      onPlayerLoggedOut in interface de.teamlapen.lib.lib.entity.IPlayerEventListener
    • canBiteEntity

      public boolean canBiteEntity(net.minecraft.world.entity.LivingEntity entity)
    • canBite

      public boolean canBite()
    • bite

      public boolean bite(int entityId)
    • onLevelChanged

      public void onLevelChanged(int newLevel, int oldLevel)
      Specified by:
      onLevelChanged in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
      Overrides:
      onLevelChanged in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • isAffectedByWolfsbane

      public boolean isAffectedByWolfsbane(net.minecraft.world.level.LevelAccessor accessor, boolean forceRefresh)
    • canLeaveFaction

      public boolean canLeaveFaction()
      Specified by:
      canLeaveFaction in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • getDisguisedAs

      @Nullable public de.teamlapen.vampirism.api.entity.factions.IFaction<?> getDisguisedAs()
      Specified by:
      getDisguisedAs in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • getDigDropTier

      public Optional<net.minecraft.world.item.Tier> getDigDropTier()
    • getDigSpeed

      public float getDigSpeed()
    • getMaxLevel

      public int getMaxLevel()
      Specified by:
      getMaxLevel in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • getNonFriendlySelector

      public Predicate<net.minecraft.world.entity.LivingEntity> getNonFriendlySelector(boolean otherFactionPlayers, boolean ignoreDisguise)
      Specified by:
      getNonFriendlySelector in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • isDisguised

      public boolean isDisguised()
      Specified by:
      isDisguised in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • getLastFormAction

      @Nullable public WerewolfFormAction getLastFormAction()
    • getSkillHandler

      @NotNull public @NotNull de.teamlapen.vampirism.api.entity.player.skills.ISkillHandler<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer> getSkillHandler()
      Specified by:
      getSkillHandler in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • getActionHandler

      public de.teamlapen.vampirism.api.entity.player.actions.IActionHandler<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer> getActionHandler()
      Specified by:
      getActionHandler in interface de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • serializeNBT

      @NotNull public @NotNull net.minecraft.nbt.CompoundTag serializeNBT(net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      serializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Specified by:
      serializeNBT in interface de.teamlapen.lib.lib.storage.ISavable
      Overrides:
      serializeNBT in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • serializeUpdateNBT

      @NotNull public @NotNull net.minecraft.nbt.CompoundTag serializeUpdateNBT(net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      serializeUpdateNBT in interface de.teamlapen.lib.lib.storage.ISyncable
      Overrides:
      serializeUpdateNBT in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag nbt)
      Specified by:
      deserializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Specified by:
      deserializeNBT in interface de.teamlapen.lib.lib.storage.ISavable
      Overrides:
      deserializeNBT in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • deserializeUpdateNBT

      public void deserializeUpdateNBT(net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag nbt)
      Specified by:
      deserializeUpdateNBT in interface de.teamlapen.lib.lib.storage.ISyncable
      Overrides:
      deserializeUpdateNBT in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • checkToolDamage

      public void checkToolDamage(@NotNull @NotNull net.minecraft.world.item.ItemStack from, @NotNull @NotNull net.minecraft.world.item.ItemStack itemInHand, boolean forceCalculation)
    • checkWerewolfFormModifier

      public void checkWerewolfFormModifier()
    • getEyeType

      public int getEyeType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
      Specified by:
      getEyeType in interface de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder
    • getSkinType

      public int getSkinType(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
      Specified by:
      getSkinType in interface de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder
    • hasGlowingEyes

      public boolean hasGlowingEyes(de.teamlapen.werewolves.api.entities.werewolf.WerewolfForm form)
      Specified by:
      hasGlowingEyes in interface de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder
    • dropEquipment

      public void dropEquipment()
    • updateMinionAttributes

      public void updateMinionAttributes(boolean increasedStats)
      Specified by:
      updateMinionAttributes in interface de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer
    • getAttachedKey

      public net.minecraft.resources.ResourceLocation getAttachedKey()
      Specified by:
      getAttachedKey in interface de.teamlapen.lib.lib.storage.IAttachedSyncable
    • nbtKey

      public String nbtKey()
      Specified by:
      nbtKey in interface de.teamlapen.lib.lib.storage.INBTObject