Package btw.entity

Class CanvasEntity

All Implemented Interfaces:
EntityWithCustomPacket

public class CanvasEntity extends Entity implements EntityWithCustomPacket
  • Field Details

    • direction

      public int direction
      the direction the painting faces
    • canvasPosX

      public int canvasPosX
    • canvasPosY

      public int canvasPosY
    • canvasPosZ

      public int canvasPosZ
    • art

      public CanvasArt art
  • Constructor Details

    • CanvasEntity

      public CanvasEntity(World par1World)
    • CanvasEntity

      public CanvasEntity(World par1World, int i, int j, int k, int iFacing)
    • CanvasEntity

      public CanvasEntity(World par1World, int i, int j, int k, int iFacing, int iArtOrdinal)
    • CanvasEntity

      public CanvasEntity(World par1World, int par2, int par3, int par4, int par5, String par6Str)
  • Method Details

    • entityInit

      protected void entityInit()
      Specified by:
      entityInit in class Entity
    • func_412_b

      public void func_412_b(int iFacing)
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class Entity
    • onValidSurface

      public boolean onValidSurface()
      checks to make sure painting can be placed there
    • canBeCollidedWith

      public boolean canBeCollidedWith()
      Returns true if other Entities should be prevented from moving through this Entity.
      Overrides:
      canBeCollidedWith in class Entity
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource source, float damage)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class Entity
    • onBroken

      public void onBroken(Entity attacker)
    • writeEntityToNBT

      public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to write subclass entity data to NBT.
      Specified by:
      writeEntityToNBT in class Entity
    • readEntityFromNBT

      public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Specified by:
      readEntityFromNBT in class Entity
    • moveEntity

      public void moveEntity(double par1, double par3, double par5)
      Tries to moves the entity by the passed in displacement. Args: x, y, z
      Overrides:
      moveEntity in class Entity
    • addVelocity

      public void addVelocity(double par1, double par3, double par5)
      Adds to the current velocity of the entity. Args: x, y, z
      Overrides:
      addVelocity in class Entity
    • setDead

      public void setDead()
      Called when painting is destroyed. Plays break sound effect
      Overrides:
      setDead in class Entity
    • getSpawnPacketForThisEntity

      public Packet getSpawnPacketForThisEntity()
      Specified by:
      getSpawnPacketForThisEntity in interface EntityWithCustomPacket
      Returns:
      Custom packet containing information for this entity to send from the server to the client
    • getTrackerViewDistance

      public int getTrackerViewDistance()
      Specified by:
      getTrackerViewDistance in interface EntityWithCustomPacket
    • getTrackerUpdateFrequency

      public int getTrackerUpdateFrequency()
      Specified by:
      getTrackerUpdateFrequency in interface EntityWithCustomPacket
    • getTrackMotion

      public boolean getTrackMotion()
      Specified by:
      getTrackMotion in interface EntityWithCustomPacket
    • shouldServerTreatAsOversized

      public boolean shouldServerTreatAsOversized()
      Description copied from interface: EntityWithCustomPacket
      Partially disables server-side visibility tests for interacting with an entity
      Specified by:
      shouldServerTreatAsOversized in interface EntityWithCustomPacket
    • shouldSetPositionOnLoad

      protected boolean shouldSetPositionOnLoad()
      Overrides:
      shouldSetPositionOnLoad in class Entity