Class VehicleEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.vehicle.VehicleEntity
All Implemented Interfaces:
ScoreHolder, CommandOutput, Nameable, EntityLike
Direct Known Subclasses:
AbstractMinecartEntity, BoatEntity

public abstract class VehicleEntity extends Entity
Mappings:
Namespace Name
official chn
intermediary net/minecraft/class_8836
named net/minecraft/entity/vehicle/VehicleEntity
  • Field Details

    • DAMAGE_WOBBLE_TICKS

      protected static final TrackedData<Integer> DAMAGE_WOBBLE_TICKS
      Mappings:
      Namespace Name Mixin selector
      official f Lchn;f:Lagm;
      intermediary field_46655 Lnet/minecraft/class_8836;field_46655:Lnet/minecraft/class_2940;
      named DAMAGE_WOBBLE_TICKS Lnet/minecraft/entity/vehicle/VehicleEntity;DAMAGE_WOBBLE_TICKS:Lnet/minecraft/entity/data/TrackedData;
    • DAMAGE_WOBBLE_SIDE

      protected static final TrackedData<Integer> DAMAGE_WOBBLE_SIDE
      Mappings:
      Namespace Name Mixin selector
      official g Lchn;g:Lagm;
      intermediary field_46656 Lnet/minecraft/class_8836;field_46656:Lnet/minecraft/class_2940;
      named DAMAGE_WOBBLE_SIDE Lnet/minecraft/entity/vehicle/VehicleEntity;DAMAGE_WOBBLE_SIDE:Lnet/minecraft/entity/data/TrackedData;
    • DAMAGE_WOBBLE_STRENGTH

      protected static final TrackedData<Float> DAMAGE_WOBBLE_STRENGTH
      Mappings:
      Namespace Name Mixin selector
      official h Lchn;h:Lagm;
      intermediary field_46657 Lnet/minecraft/class_8836;field_46657:Lnet/minecraft/class_2940;
      named DAMAGE_WOBBLE_STRENGTH Lnet/minecraft/entity/vehicle/VehicleEntity;DAMAGE_WOBBLE_STRENGTH:Lnet/minecraft/entity/data/TrackedData;
  • Constructor Details

    • VehicleEntity

      public VehicleEntity(EntityType<?> type, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lblv;<init>(Lblz;Lctp;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
  • Method Details

    • damage

      public boolean damage(DamageSource source, float amount)
      Applies a damage to this entity. The exact implementation differs between subclasses.

      LivingEntity has health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.

      Some entities like ItemEntity also have health value, which the overridden method decrements. There also exist several entities, like EndCrystalEntity, where any damage discards the entity (perhaps with an explosion).

      If this is overridden, it must check the result of Entity.isInvulnerableTo(net.minecraft.entity.damage.DamageSource) and return early.

      Overrides:
      damage in class Entity
      Returns:
      whether the entity was actually damaged
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lblv;a(Lbkt;F)Z
      intermediary method_5643 Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;F)Z
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z
    • shouldAlwaysKill

      boolean shouldAlwaysKill(DamageSource source)
      Mappings:
      Namespace Name Mixin selector
      official d Lchn;d(Lbkt;)Z
      intermediary method_55056 Lnet/minecraft/class_8836;method_55056(Lnet/minecraft/class_1282;)Z
      named shouldAlwaysKill Lnet/minecraft/entity/vehicle/VehicleEntity;shouldAlwaysKill(Lnet/minecraft/entity/damage/DamageSource;)Z
    • killAndDropItem

      public void killAndDropItem(Item selfAsItem)
      Mappings:
      Namespace Name Mixin selector
      official b Lchn;b(Lcmt;)V
      intermediary method_54298 Lnet/minecraft/class_8836;method_54298(Lnet/minecraft/class_1792;)V
      named killAndDropItem Lnet/minecraft/entity/vehicle/VehicleEntity;killAndDropItem(Lnet/minecraft/item/Item;)V
    • initDataTracker

      protected void initDataTracker()
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      Mappings:
      Namespace Name Mixin selector
      official c_ Lblv;c_()V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693()V
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker()V
    • setDamageWobbleTicks

      public void setDamageWobbleTicks(int damageWobbleTicks)
      Mappings:
      Namespace Name Mixin selector
      official d Lchn;d(I)V
      intermediary method_54299 Lnet/minecraft/class_8836;method_54299(I)V
      named setDamageWobbleTicks Lnet/minecraft/entity/vehicle/VehicleEntity;setDamageWobbleTicks(I)V
    • setDamageWobbleSide

      public void setDamageWobbleSide(int damageWobbleSide)
      Mappings:
      Namespace Name Mixin selector
      official m Lchn;m(I)V
      intermediary method_54300 Lnet/minecraft/class_8836;method_54300(I)V
      named setDamageWobbleSide Lnet/minecraft/entity/vehicle/VehicleEntity;setDamageWobbleSide(I)V
    • setDamageWobbleStrength

      public void setDamageWobbleStrength(float damageWobbleStrength)
      Mappings:
      Namespace Name Mixin selector
      official b Lchn;b(F)V
      intermediary method_54297 Lnet/minecraft/class_8836;method_54297(F)V
      named setDamageWobbleStrength Lnet/minecraft/entity/vehicle/VehicleEntity;setDamageWobbleStrength(F)V
    • getDamageWobbleStrength

      public float getDamageWobbleStrength()
      Mappings:
      Namespace Name Mixin selector
      official N Lchn;N()F
      intermediary method_54294 Lnet/minecraft/class_8836;method_54294()F
      named getDamageWobbleStrength Lnet/minecraft/entity/vehicle/VehicleEntity;getDamageWobbleStrength()F
    • getDamageWobbleTicks

      public int getDamageWobbleTicks()
      Mappings:
      Namespace Name Mixin selector
      official O Lchn;O()I
      intermediary method_54295 Lnet/minecraft/class_8836;method_54295()I
      named getDamageWobbleTicks Lnet/minecraft/entity/vehicle/VehicleEntity;getDamageWobbleTicks()I
    • getDamageWobbleSide

      public int getDamageWobbleSide()
      Mappings:
      Namespace Name Mixin selector
      official P Lchn;P()I
      intermediary method_54296 Lnet/minecraft/class_8836;method_54296()I
      named getDamageWobbleSide Lnet/minecraft/entity/vehicle/VehicleEntity;getDamageWobbleSide()I
    • killAndDropSelf

      protected void killAndDropSelf(DamageSource source)
      Mappings:
      Namespace Name Mixin selector
      official a Lchn;a(Lbkt;)V
      intermediary method_7516 Lnet/minecraft/class_8836;method_7516(Lnet/minecraft/class_1282;)V
      named killAndDropSelf Lnet/minecraft/entity/vehicle/VehicleEntity;killAndDropSelf(Lnet/minecraft/entity/damage/DamageSource;)V
    • asItem

      abstract Item asItem()
      Mappings:
      Namespace Name Mixin selector
      official ah_ Lchn;ah_()Lcmt;
      intermediary method_7557 Lnet/minecraft/class_8836;method_7557()Lnet/minecraft/class_1792;
      named asItem Lnet/minecraft/entity/vehicle/VehicleEntity;asItem()Lnet/minecraft/item/Item;