Class VehicleEntity

All Implemented Interfaces:
CommandSource, SyncedDataHolder, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
AbstractMinecart, Boat

public abstract class VehicleEntity extends Entity
  • Field Details

  • Constructor Details

    • VehicleEntity

      public VehicleEntity(EntityType<?> p_306130_, Level p_306167_)
  • Method Details

    • hurt

      public boolean hurt(DamageSource p_305898_, float p_305999_)
      Overrides:
      hurt in class Entity
    • shouldSourceDestroy

      boolean shouldSourceDestroy(DamageSource p_312875_)
    • destroy

      public void destroy(Item p_306235_)
    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder p_326046_)
      Specified by:
      defineSynchedData in class Entity
    • setHurtTime

      public void setHurtTime(int p_306126_)
    • setHurtDir

      public void setHurtDir(int p_306138_)
    • setDamage

      public void setDamage(float p_306297_)
    • getDamage

      public float getDamage()
    • getHurtTime

      public int getHurtTime()
    • getHurtDir

      public int getHurtDir()
    • destroy

      protected void destroy(DamageSource p_306223_)
    • getDropItem

      protected abstract Item getDropItem()