net.minecraft.entity.passive

public class BatEntity

extends AmbientEntity

All mapped superinterfaces:

Nameable, EntityLike, UniquelyIdentifiable, ScoreHolder, DataTracked, ComponentsAccess, HeldItemContext, StackReferenceGetter, DebugTrackable, EntryConvertible, Attackable, ServerWaypoint, Waypoint, Targeter, EquipmentHolder, Leashable

net.minecraft.world.entity.ambient.Bat
net.minecraft.class_1420
net.minecraft.entity.passive.BatEntity

Field summary

Modifier and TypeField
public static final float
FLAP_LENGTH_SECONDS
field_46966
field_46966
public static final float
TICKS_PER_FLAP
field_46967
field_46967
private static final TrackedData<Byte>
DATA_ID_FLAGS
field_6728
BAT_FLAGS
private static final int
FLAG_RESTING
field_30269
ROOSTING_FLAG
private static final TargetPredicate
BAT_RESTING_TARGETING
field_18100
CLOSE_PLAYER_PREDICATE
private static final byte
DEFAULT_FLAGS
field_57597
DEFAULT_BAT_FLAGS
public final AnimationState
flyAnimationState
field_46968
flyingAnimationState
public final AnimationState
restAnimationState
field_46969
roostingAnimationState
private BlockPos
targetPosition
field_6729
hangingPosition

Constructor summary

ModifierConstructor
public (EntityType<? extends BatEntity> type, World level)

Method summary

Modifier and TypeMethod
public boolean
isFlapping()
method_5776()
isFlappingWings()
protected void
defineSynchedData(SynchedEntityData$Builder entityData)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
protected float
getSoundVolume()
method_6107()
getSoundVolume()
public float
getVoicePitch()
method_6017()
getSoundPitch()
public SoundEvent
getAmbientSound()
method_5994()
getAmbientSound()
protected SoundEvent
getHurtSound(DamageSource source)
method_6011(class_1282 arg0)
getHurtSound(DamageSource arg0)
protected SoundEvent
getDeathSound()
method_6002()
getDeathSound()
public boolean
isPushable()
method_5810()
isPushable()
protected void
doPush(Entity entity)
method_6087(class_1297 arg0)
pushAway(Entity arg0)
protected void
pushEntities()
method_6070()
tickCramming()
public static DefaultAttributeContainer$Builder
createAttributes()
method_26878()
createBatAttributes()
public boolean
isResting()
method_6450()
isRoosting()
public void
setResting(boolean value)
method_6449(boolean arg0)
setRoosting(boolean roosting)
public void
tick()
method_5773()
tick()
protected void
customServerAiStep(ServerLevel level)
method_5958(class_3218 arg0)
mobTick(ServerWorld arg0)
protected Entity$MoveEffect
getMovementEmission()
method_33570()
getMoveEffect()
protected void
checkFallDamage(double ya, boolean onGround, BlockState onState, BlockPos pos)
method_5623(double arg0, boolean arg1, class_2680 arg2, class_2338 arg3)
fall(double arg0, boolean arg1, BlockState arg2, BlockPos arg3)
public boolean
isIgnoringBlockTriggers()
method_5696()
canAvoidTraps()
public boolean
hurtServer(ServerLevel level, DamageSource source, float damage)
method_64397(class_3218 arg0, class_1282 arg1, float arg2)
damage(ServerWorld arg0, DamageSource arg1, float arg2)
protected void
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
protected void
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
public static boolean
checkBatSpawnRules(EntityType<Bat> type, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random)
method_20661(class_1299<class_1420> arg0, class_1936 arg1, class_3730 arg2, class_2338 arg3, class_5819 arg4)
canSpawn(EntityType<BatEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
private void
setupAnimationStates()
method_54758()
updateAnimations()