Class MechanicalPowerSourceEntity

java.lang.Object
net.minecraft.src.Entity
api.entity.mechanical.MechanicalPowerSourceEntity
All Implemented Interfaces:
EntityWithCustomPacket
Direct Known Subclasses:
MechanicalPowerSourceEntityHorizontal, VerticalWindMillEntity

public abstract class MechanicalPowerSourceEntity extends Entity implements EntityWithCustomPacket
  • Field Details

    • rotation

      public float rotation
    • currentDamage

      public int currentDamage
    • timeSinceHit

      public int timeSinceHit
    • rockDirection

      public int rockDirection
    • providingPower

      protected boolean providingPower
    • fullUpdateTickCount

      protected int fullUpdateTickCount
  • Constructor Details

    • MechanicalPowerSourceEntity

      public MechanicalPowerSourceEntity(World world)
    • MechanicalPowerSourceEntity

      public MechanicalPowerSourceEntity(World world, double x, double y, double z)
  • Method Details

    • entityInit

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

      protected boolean canTriggerWalking()
      Description copied from class: Entity
      returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling crops
      Overrides:
      canTriggerWalking in class Entity
    • getCollisionBox

      public AxisAlignedBB getCollisionBox(Entity entity)
      Description copied from class: Entity
      Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be pushable on contact, like boats or minecarts.
      Overrides:
      getCollisionBox in class Entity
    • getBoundingBox

      public AxisAlignedBB getBoundingBox()
      Description copied from class: Entity
      returns the bounding box for this entity
      Overrides:
      getBoundingBox in class Entity
    • canBePushed

      public boolean canBePushed()
      Description copied from class: Entity
      Returns true if this entity should push and be pushed by other entities when colliding.
      Overrides:
      canBePushed in class Entity
    • canBeCollidedWith

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

      public void moveEntity(double deltaX, double deltaY, double deltaZ)
      Overrides:
      moveEntity in class Entity
    • setFire

      public void setFire(int i)
      Description copied from class: Entity
      Sets entity to burn for x amount of seconds, cannot lower amount of existing fire.
      Overrides:
      setFire in class Entity
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource damageSource, float i)
      Description copied from class: Entity
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class Entity
    • onUpdate

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

      protected boolean shouldSetPositionOnLoad()
      Overrides:
      shouldSetPositionOnLoad in class Entity
    • attractsLightning

      public boolean attractsLightning()
      Overrides:
      attractsLightning in class Entity
    • 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
    • getWidth

      public abstract float getWidth()
    • getHeight

      public abstract float getHeight()
    • getDepth

      public abstract float getDepth()
    • initBoundingBox

      public abstract void initBoundingBox()
    • getDeviceBounds

      public abstract AxisAlignedBB getDeviceBounds()
    • getMaxDamage

      public abstract int getMaxDamage()
    • getTicksPerFullUpdate

      public abstract int getTicksPerFullUpdate()
    • destroyWithDrop

      public abstract void destroyWithDrop()
    • validateAreaAroundDevice

      public abstract boolean validateAreaAroundDevice()
    • validateConnectedAxles

      protected abstract boolean validateConnectedAxles()
    • computeRotation

      public abstract float computeRotation()
    • transferPowerStateToConnectedAxles

      public abstract void transferPowerStateToConnectedAxles()
    • onClientRotationOctantChange

      protected void onClientRotationOctantChange()
    • isClearOfBlockingEntities

      public boolean isClearOfBlockingEntities()
    • getRotationSpeed

      public float getRotationSpeed()
    • setRotationSpeed

      public void setRotationSpeed(float fRotation)
    • getRotationSpeedScaled

      public int getRotationSpeedScaled()
    • setRotationSpeedScaled

      public void setRotationSpeedScaled(int iRotationSpeedScaled)
    • onFullUpdateServer

      protected void onFullUpdateServer()
    • setPositionAndRotation2

      @Environment(CLIENT) public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
      Description copied from class: Entity
      Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, posY, posZ, yaw, pitch
      Overrides:
      setPositionAndRotation2 in class Entity
    • getShadowSize

      @Environment(CLIENT) public float getShadowSize()
      Overrides:
      getShadowSize in class Entity
    • performHurtAnimation

      @Environment(CLIENT) public void performHurtAnimation()
      Description copied from class: Entity
      Setups the entity to do the hurt animation. Only used by packets in multiplayer.
      Overrides:
      performHurtAnimation in class Entity