Class MovingPlatformEntity

java.lang.Object
net.minecraft.src.Entity
btw.entity.mechanical.platform.MovingPlatformEntity
All Implemented Interfaces:
EntityWithCustomPacket, IgnoreServerValidationEntity

public class MovingPlatformEntity extends Entity implements EntityWithCustomPacket, IgnoreServerValidationEntity
  • Constructor Details

    • MovingPlatformEntity

      public MovingPlatformEntity(World world)
    • MovingPlatformEntity

      public MovingPlatformEntity(World world, double x, double y, double z)
    • MovingPlatformEntity

      public MovingPlatformEntity(World world, double x, double y, double z, MovingAnchorEntity entityMovingAnchor)
  • Method Details

    • entityInit

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

      protected void writeEntityToNBT(NBTTagCompound nbttagcompound)
      Description copied from class: Entity
      (abstract) Protected helper method to write subclass entity data to NBT.
      Specified by:
      writeEntityToNBT in class Entity
    • readEntityFromNBT

      protected void readEntityFromNBT(NBTTagCompound nbttagcompound)
      Description copied from class: Entity
      (abstract) Protected helper method to read subclass entity data from NBT.
      Specified by:
      readEntityFromNBT 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
    • onUpdate

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

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

      protected boolean shouldSetPositionOnLoad()
      Overrides:
      shouldSetPositionOnLoad 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
    • getVehicleSpawnPacketType

      public static int getVehicleSpawnPacketType()
    • destroyPlatformWithDrop

      public void destroyPlatformWithDrop()
    • getShadowSize

      @Environment(CLIENT) public float getShadowSize()
      Overrides:
      getShadowSize in class Entity
    • 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