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.IPlayerEventListener, de.teamlapen.lib.lib.network.ISyncable, de.teamlapen.lib.lib.network.ISyncable.ISyncableEntityCapabilityInst, de.teamlapen.vampirism.api.entity.factions.IFactionEntity, de.teamlapen.vampirism.api.entity.player.IFactionPlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>, de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer, de.teamlapen.werewolves.api.entities.werewolf.IWerewolf, de.teamlapen.werewolves.api.entities.werewolf.IWerewolfDataholder

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/interfaces inherited from interface de.teamlapen.lib.lib.network.ISyncable

    de.teamlapen.lib.lib.network.ISyncable.ISyncableEntityCapabilityInst
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraftforge.common.capabilities.Capability<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
     

    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
    void
     
    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
     
    protected de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    copyFromPlayer(net.minecraft.world.entity.player.Player playerEntity)
     
    static net.minecraftforge.common.capabilities.ICapabilityProvider
    createNewCapability(net.minecraft.world.entity.player.Player player)
     
    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)
     
    static net.minecraftforge.common.util.LazyOptional<WerewolfPlayer>
    getOpt(net.minecraft.world.entity.player.Player playerEntity)
     
    static net.minecraftforge.common.util.LazyOptional<WerewolfPlayer>
    getOptEx(net.minecraft.world.entity.Entity entity)
    gets werewolf player optional
    static net.minecraftforge.common.util.LazyOptional<WerewolfPlayer>
    getOptSave(net.minecraft.world.entity.player.Player player)
     
    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
    loadData(net.minecraft.nbt.CompoundTag compound)
     
    protected void
    loadUpdate(net.minecraft.nbt.CompoundTag nbt)
     
    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.minecraftforge.event.TickEvent.Phase phase)
     
    void
     
    void
    saveData(net.minecraft.nbt.CompoundTag compound)
     
    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)
     
    protected void
    writeFullUpdate(net.minecraft.nbt.CompoundTag nbt)
     

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

    getLevel, getRepresentingEntity, getRepresentingPlayer, getTaskManager, getTheEntityID, isRemote, loadUpdateFromNBT, onPlayerClone, sync, sync, writeFullUpdateToNBT

    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

    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
  • Field Details

    • CAP

      public static final net.minecraftforge.common.capabilities.Capability<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer> CAP
  • 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

      public static net.minecraftforge.common.util.LazyOptional<WerewolfPlayer> getOpt(@Nonnull net.minecraft.world.entity.player.Player playerEntity)
    • getOptSave

      public static net.minecraftforge.common.util.LazyOptional<WerewolfPlayer> getOptSave(net.minecraft.world.entity.player.Player player)
    • getOptEx

      public static net.minecraftforge.common.util.LazyOptional<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)
    • copyFromPlayer

      protected de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer> copyFromPlayer(net.minecraft.world.entity.player.Player playerEntity)
      Specified by:
      copyFromPlayer in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • removeArmorModifier

      public void removeArmorModifier()
    • addArmorModifier

      public void addArmorModifier()
    • 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>
    • 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
    • onUpdatePlayer

      public void onUpdatePlayer(net.minecraftforge.event.TickEvent.Phase phase)
      Specified by:
      onUpdatePlayer 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)
    • getCapKey

      public net.minecraft.resources.ResourceLocation getCapKey()
      Specified by:
      getCapKey in interface de.teamlapen.lib.lib.network.ISyncable.ISyncableEntityCapabilityInst
    • 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

      public 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>
    • saveData

      public void saveData(net.minecraft.nbt.CompoundTag compound)
      Overrides:
      saveData in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • loadData

      public void loadData(net.minecraft.nbt.CompoundTag compound)
      Overrides:
      loadData in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • writeFullUpdate

      protected void writeFullUpdate(net.minecraft.nbt.CompoundTag nbt)
      Overrides:
      writeFullUpdate in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • loadUpdate

      protected void loadUpdate(net.minecraft.nbt.CompoundTag nbt)
      Overrides:
      loadUpdate in class de.teamlapen.vampirism.entity.player.FactionBasePlayer<de.teamlapen.werewolves.api.entities.player.IWerewolfPlayer>
    • createNewCapability

      public static net.minecraftforge.common.capabilities.ICapabilityProvider createNewCapability(net.minecraft.world.entity.player.Player player)
    • 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