Skip to content

Package net.minecraft.world.entity.animal.camel

Part 1/1


Camel

  • Full name: net.minecraft.world.entity.animal.camel.Camel
  • Package: net.minecraft.world.entity.animal.camel
  • Source: commonnet/minecraft/world/entity/animal/camel/Camel.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractHorse

net.minecraft.world.entity.animal.camel.Camel#actuallyHurt(ServerLevel,DamageSource,float)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:447
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ actuallyHurt ตาม implementation ของ Camel

ทำงานยังไง

เรียกต่อ: standUpInstantly().

Parameters

  • ServerLevel serverLevel
  • DamageSource damageSource
  • float f

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
DamageSource damageSource = ...;
@Override
protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) {
    super.actuallyHurt(serverLevel, damageSource, f);
}

net.minecraft.world.entity.animal.camel.Camel#addAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:86
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Additional Save Data

ทำงานยังไง

เรียกต่อ: putLong(), get().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Camel instance = ...;
CompoundTag compoundTag = ...;
instance.addAdditionalSaveData(compoundTag);

net.minecraft.world.entity.animal.camel.Camel#brainProvider()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:127
  • Modifiers: protected
  • Return: Brain.Provider<Camel>

คืออะไร

ดำเนินการ brainProvider ตาม implementation ของ Camel

ทำงานยังไง

คืนค่า: CamelAi.brainProvider().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Brain.Provider<Camel> brainProvider() {
    return super.brainProvider();
}

net.minecraft.world.entity.animal.camel.Camel#Camel(EntityType<? extends Camel>,Level)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:77
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Camel ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: moveControl, lookControl. เรียกต่อ: CamelMoveControl(), CamelLookControl(), getNavigation(), setCanFloat(), setCanWalkOverFences(). สร้างออบเจ็กต์: Camel.CamelMoveControl, Camel.CamelLookControl.

Parameters

  • EntityType<? extends Camel> entityType
  • Level level

ตัวอย่างใช้งาน

EntityType<? extends Camel> entityType = ...;
Level level = ...;
Camel instance = new Camel(entityType, level);

net.minecraft.world.entity.animal.camel.Camel#canAddPassenger(Entity)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:522
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Add Passenger

ทำงานยังไง

เรียกต่อ: getPassengers(), size(). คืนค่า: this.getPassengers().size() <= 2.

Parameters

  • Entity entity

ตัวอย่างใช้งาน

Entity entity = ...;
@Override
protected boolean canAddPassenger(Entity entity) {
    return super.canAddPassenger(entity);
}

net.minecraft.world.entity.animal.camel.Camel#canCamelChangePose()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:380
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Camel Change Pose

ทำงานยังไง

เรียกต่อ: wouldNotSuffocateAtTargetPose(), isCamelSitting(). คืนค่า: this.wouldNotSuffocateAtTargetPose(this.isCamelSitting() ? Pose.STANDING : Pose.SITTING).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.canCamelChangePose();

net.minecraft.world.entity.animal.camel.Camel#canJump()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:262
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Jump

ทำงานยังไง

เรียกต่อ: refuseToMove(). คืนค่า: !this.refuseToMove() && super.canJump().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.canJump();

net.minecraft.world.entity.animal.camel.Camel#canMate(Animal)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:431
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Mate

ทำงานยังไง

เรียกต่อ: canParent(). คืนค่า: animal != this && animal instanceof Camel camel && this.canParent() && camel.canParent().

Parameters

  • Animal animal

ตัวอย่างใช้งาน

Camel instance = ...;
Animal animal = ...;
boolean result = instance.canMate(animal);

net.minecraft.world.entity.animal.camel.Camel#canPerformRearing()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:426
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Perform Rearing

ทำงานยังไง

คืนค่า: false.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected boolean canPerformRearing() {
    return super.canPerformRearing();
}

net.minecraft.world.entity.animal.camel.Camel#canSprint()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:274
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Sprint

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.canSprint();

net.minecraft.world.entity.animal.camel.Camel#createAttributes()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:103
  • Modifiers: public static
  • Return: AttributeSupplier.Builder

คืออะไร

สร้าง Attributes

ทำงานยังไง

เรียกต่อ: createBaseHorseAttributes(), add().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AttributeSupplier.Builder result = Camel.createAttributes();

net.minecraft.world.entity.animal.camel.Camel#createBodyControl()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:613
  • Modifiers: protected
  • Return: BodyRotationControl

คืออะไร

สร้าง Body Control

ทำงานยังไง

เรียกต่อ: CamelBodyRotationControl(). สร้างออบเจ็กต์: Camel.CamelBodyRotationControl. คืนค่า: new Camel.CamelBodyRotationControl(this).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected BodyRotationControl createBodyControl() {
    return super.createBodyControl();
}

net.minecraft.world.entity.animal.camel.Camel#customServerAiStep(ServerLevel)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:146
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ customServerAiStep ตาม implementation ของ Camel

ทำงานยังไง

เรียกต่อ: get(), push(), getBrain(), tick(), pop(), updateActivity().

Parameters

  • ServerLevel serverLevel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
@Override
protected void customServerAiStep(ServerLevel serverLevel) {
    super.customServerAiStep(serverLevel);
}

net.minecraft.world.entity.animal.camel.Camel#defineSynchedData(SynchedEntityData.Builder)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:111
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ defineSynchedData ตาม implementation ของ Camel

ทำงานยังไง

เรียกต่อ: define().

Parameters

  • SynchedEntityData.Builder builder

ตัวอย่างใช้งาน

SynchedEntityData.Builder builder = ...;
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
    super.defineSynchedData(builder);
}

net.minecraft.world.entity.animal.camel.Camel#executeRidersJump(float,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:279
  • Modifiers: protected
  • Return: void

คืออะไร

สั่งทำงาน Riders Jump

ทำงานยังไง

แก้ state: dashCooldown, hasImpulse. เรียกต่อ: getJumpPower(), addDeltaMovement(), getLookAngle(), multiply(), normalize(), scale(), getAttributeValue(), getBlockSpeedFactor().

Parameters

  • float f
  • Vec3 vec3

ตัวอย่างใช้งาน

Vec3 vec3 = ...;
@Override
protected void executeRidersJump(float f, Vec3 vec3) {
    super.executeRidersJump(f, vec3);
}

net.minecraft.world.entity.animal.camel.Camel#finalizeSpawn(ServerLevelAccessor,DifficultyInstance,EntitySpawnReason,SpawnGroupData)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:118
  • Modifiers: public
  • Return: SpawnGroupData

คืออะไร

ดำเนินการ finalizeSpawn ตาม implementation ของ Camel

ทำงานยังไง

เรียกต่อ: initMemories(), getRandom(), resetLastPoseChangeTickToFullStand(), getLevel(), getGameTime(). คืนค่า: super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData).

Parameters

  • ServerLevelAccessor serverLevelAccessor
  • DifficultyInstance difficultyInstance
  • EntitySpawnReason entitySpawnReason
  • SpawnGroupData spawnGroupData

ตัวอย่างใช้งาน

Camel instance = ...;
ServerLevelAccessor serverLevelAccessor = ...;
DifficultyInstance difficultyInstance = ...;
EntitySpawnReason entitySpawnReason = ...;
SpawnGroupData spawnGroupData = ...;
SpawnGroupData result = instance.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData);

net.minecraft.world.entity.animal.camel.Camel#getAgeScale()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:472
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Age Scale

ทำงานยังไง

เรียกต่อ: isBaby(). คืนค่า: this.isBaby() ? 0.45F : 1.0F.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
float result = instance.getAgeScale();

net.minecraft.world.entity.animal.camel.Camel#getAmbientSound()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:318
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Ambient Sound

ทำงานยังไง

คืนค่า: SoundEvents.CAMEL_AMBIENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
}

net.minecraft.world.entity.animal.camel.Camel#getBreedOffspring(ServerLevel,AgeableMob)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:436
  • Modifiers: public
  • Return: Camel

คืออะไร

อ่านค่า Breed Offspring

ทำงานยังไง

เรียกต่อ: create(). คืนค่า: EntityType.CAMEL.create(serverLevel, EntitySpawnReason.BREEDING).

Parameters

  • ServerLevel serverLevel
  • AgeableMob ageableMob

ตัวอย่างใช้งาน

Camel instance = ...;
ServerLevel serverLevel = ...;
AgeableMob ageableMob = ...;
Camel result = instance.getBreedOffspring(serverLevel, ageableMob);

net.minecraft.world.entity.animal.camel.Camel#getDeathSound()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:323
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Death Sound

ทำงานยังไง

คืนค่า: SoundEvents.CAMEL_DEATH.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getDeathSound() {
    return super.getDeathSound();
}

net.minecraft.world.entity.animal.camel.Camel#getDefaultDimensions(Pose)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:141
  • Modifiers: public
  • Return: EntityDimensions

คืออะไร

อ่านค่า Default Dimensions

ทำงานยังไง

เรียกต่อ: scale(), getAgeScale(). คืนค่า: pose == Pose.SITTING ? SITTING_DIMENSIONS.scale(this.getAgeScale()) : super.getDefaultDimensions(pose).

Parameters

  • Pose pose

ตัวอย่างใช้งาน

Camel instance = ...;
Pose pose = ...;
EntityDimensions result = instance.getDefaultDimensions(pose);

net.minecraft.world.entity.animal.camel.Camel#getEatingSound()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:441
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Eating Sound

ทำงานยังไง

คืนค่า: SoundEvents.CAMEL_EAT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected SoundEvent getEatingSound() {
    return super.getEatingSound();
}

net.minecraft.world.entity.animal.camel.Camel#getHurtSound(DamageSource)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:328
  • Modifiers: protected
  • Return: SoundEvent

คืออะไร

อ่านค่า Hurt Sound

ทำงานยังไง

คืนค่า: SoundEvents.CAMEL_HURT.

Parameters

  • DamageSource damageSource

ตัวอย่างใช้งาน

DamageSource damageSource = ...;
@Override
protected SoundEvent getHurtSound(DamageSource damageSource) {
    return super.getHurtSound(damageSource);
}

net.minecraft.world.entity.animal.camel.Camel#getJumpCooldown()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:313
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Jump Cooldown

ทำงานยังไง

คืนค่า: this.dashCooldown.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
int result = instance.getJumpCooldown();

net.minecraft.world.entity.animal.camel.Camel#getLeashOffset(float)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:510
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Leash Offset

ทำงานยังไง

เรียกต่อ: getDimensions(), getPose(), getAgeScale(), getBodyAnchorAnimationYOffset(), width(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, this.getBodyAnchorAnimationYOffset(true, f, entityDimensions, g) - 0.2F * g, entityDimensions.width() * 0.56F).

Parameters

  • float f

ตัวอย่างใช้งาน

Camel instance = ...;
Vec3 result = instance.getLeashOffset(0.0F);

net.minecraft.world.entity.animal.camel.Camel#getMaxHeadYRot()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:517
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Max Head YRot

ทำงานยังไง

คืนค่า: 30.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
int result = instance.getMaxHeadYRot();

net.minecraft.world.entity.animal.camel.Camel#getPassengerAttachmentPoint(Entity,EntityDimensions,float)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:453
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Passenger Attachment Point

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: max(), getPassengers(), indexOf(), isRemoved(), getBodyAnchorAnimationYOffset(), size(), yRot(), getYRot(). สร้างออบเจ็กต์: Vec3. คืนค่า: new Vec3(0.0, h, g * f).yRot(-this.getYRot() * (float) (Math.PI / 180.0)).

Parameters

  • Entity entity
  • EntityDimensions entityDimensions
  • float f

ตัวอย่างใช้งาน

Entity entity = ...;
EntityDimensions entityDimensions = ...;
@Override
protected Vec3 getPassengerAttachmentPoint(Entity entity, EntityDimensions entityDimensions, float f) {
    return super.getPassengerAttachmentPoint(entity, entityDimensions, f);
}

net.minecraft.world.entity.animal.camel.Camel#getPoseTime()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:583
  • Modifiers: public
  • Return: long

คืออะไร

อ่านค่า Pose Time

ทำงานยังไง

เรียกต่อ: level(), getGameTime(), abs(), get(). คืนค่า: this.level().getGameTime() - Math.abs(this.entityData.get(LAST_POSE_CHANGE_TICK)).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
long result = instance.getPoseTime();

net.minecraft.world.entity.animal.camel.Camel#getRiddenInput(Player,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:257
  • Modifiers: protected
  • Return: Vec3

คืออะไร

อ่านค่า Ridden Input

ทำงานยังไง

เรียกต่อ: refuseToMove(). คืนค่า: this.refuseToMove() ? Vec3.ZERO : super.getRiddenInput(player, vec3).

Parameters

  • Player player
  • Vec3 vec3

ตัวอย่างใช้งาน

Player player = ...;
Vec3 vec3 = ...;
@Override
protected Vec3 getRiddenInput(Player player, Vec3 vec3) {
    return super.getRiddenInput(player, vec3);
}

net.minecraft.world.entity.animal.camel.Camel#getRiddenRotation(LivingEntity)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:252
  • Modifiers: protected
  • Return: Vec2

คืออะไร

อ่านค่า Ridden Rotation

ทำงานยังไง

เรียกต่อ: refuseToMove(), getXRot(), getYRot(). สร้างออบเจ็กต์: Vec2. คืนค่า: this.refuseToMove() ? new Vec2(this.getXRot(), this.getYRot()) : super.getRiddenRotation(livingEntity).

Parameters

  • LivingEntity livingEntity

ตัวอย่างใช้งาน

LivingEntity livingEntity = ...;
@Override
protected Vec2 getRiddenRotation(LivingEntity livingEntity) {
    return super.getRiddenRotation(livingEntity);
}

net.minecraft.world.entity.animal.camel.Camel#getRiddenSpeed(Player)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:246
  • Modifiers: protected
  • Return: float

คืออะไร

อ่านค่า Ridden Speed

ทำงานยังไง

เรียกต่อ: isSprinting(), getJumpCooldown(), getAttributeValue(). คืนค่า: (float)this.getAttributeValue(Attributes.MOVEMENT_SPEED) + f.

Parameters

  • Player player

ตัวอย่างใช้งาน

Player player = ...;
@Override
protected float getRiddenSpeed(Player player) {
    return super.getRiddenSpeed(player);
}

net.minecraft.world.entity.animal.camel.Camel#getSaddleSoundEvent()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:587
  • Modifiers: public
  • Return: SoundEvent

คืออะไร

อ่านค่า Saddle Sound Event

ทำงานยังไง

คืนค่า: SoundEvents.CAMEL_SADDLE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
SoundEvent result = instance.getSaddleSoundEvent();

net.minecraft.world.entity.animal.camel.Camel#handleEating(Player,ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:384
  • Modifiers: protected
  • Return: boolean

คืออะไร

จัดการ Eating

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isFood(), getHealth(), getMaxHealth(), heal(), isTamed(), getAge(), canFallInLove(), setInLove(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Player player
  • ItemStack itemStack

ตัวอย่างใช้งาน

Player player = ...;
ItemStack itemStack = ...;
@Override
protected boolean handleEating(Player player, ItemStack itemStack) {
    return super.handleEating(player, itemStack);
}

net.minecraft.world.entity.animal.camel.Camel#handleLeashAtDistance(Entity,float)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:371
  • Modifiers: public
  • Return: boolean

คืออะไร

จัดการ Leash At Distance

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCamelSitting(), isInPoseTransition(), canCamelChangePose(), standUp(). คืนค่า: true.

Parameters

  • Entity entity
  • float f

ตัวอย่างใช้งาน

Camel instance = ...;
Entity entity = ...;
boolean result = instance.handleLeashAtDistance(entity, 0.0F);

net.minecraft.world.entity.animal.camel.Camel#handleStartJump(int)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:302
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Start Jump

ทำงานยังไง

เรียกต่อ: makeSound(), gameEvent(), setDashing().

Parameters

  • int i

ตัวอย่างใช้งาน

Camel instance = ...;
instance.handleStartJump(0);

net.minecraft.world.entity.animal.camel.Camel#handleStopJump()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:309
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Stop Jump

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
instance.handleStopJump();

net.minecraft.world.entity.animal.camel.Camel#isCamelSitting()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:533
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Camel Sitting

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.entityData.get(LAST_POSE_CHANGE_TICK) < 0L.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.isCamelSitting();

net.minecraft.world.entity.animal.camel.Camel#isCamelVisuallySitting()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:537
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Camel Visually Sitting

ทำงานยังไง

เรียกต่อ: getPoseTime(), isCamelSitting(). คืนค่า: this.getPoseTime() < 0L != this.isCamelSitting().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.isCamelVisuallySitting();

net.minecraft.world.entity.animal.camel.Camel#isDashing()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:294
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Dashing

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.entityData.get(DASH).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.isDashing();

net.minecraft.world.entity.animal.camel.Camel#isFood(ItemStack)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:342
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Food

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: itemStack.is(ItemTags.CAMEL_FOOD).

Parameters

  • ItemStack itemStack

ตัวอย่างใช้งาน

Camel instance = ...;
ItemStack itemStack = ...;
boolean result = instance.isFood(itemStack);

net.minecraft.world.entity.animal.camel.Camel#isInPoseTransition()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:541
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ In Pose Transition

ทำงานยังไง

เรียกต่อ: getPoseTime(), isCamelSitting(). คืนค่า: l < (this.isCamelSitting() ? 40 : 52).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.isInPoseTransition();

net.minecraft.world.entity.animal.camel.Camel#isTamed()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:601
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Tamed

ทำงานยังไง

คืนค่า: true.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.isTamed();

net.minecraft.world.entity.animal.camel.Camel#makeBrain(Dynamic<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:136
  • Modifiers: protected
  • Return: Brain<?>

คืออะไร

สร้าง Brain

ทำงานยังไง

เรียกต่อ: brainProvider(). คืนค่า: CamelAi.makeBrain(this.brainProvider().makeBrain(dynamic)).

Parameters

  • Dynamic<?> dynamic

ตัวอย่างใช้งาน

Dynamic<?> dynamic = ...;
@Override
protected Brain<?> makeBrain(Dynamic<?> dynamic) {
    return super.makeBrain(dynamic);
}

net.minecraft.world.entity.animal.camel.Camel#mobInteract(Player,InteractionHand)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:347
  • Modifiers: public
  • Return: InteractionResult

คืออะไร

ดำเนินการ mobInteract ตาม implementation ของ Camel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getItemInHand(), isSecondaryUseActive(), isBaby(), openCustomInventoryScreen(), interactLivingEntity(), consumesAction(), isFood(), fedFood(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Player player
  • InteractionHand interactionHand

ตัวอย่างใช้งาน

Camel instance = ...;
Player player = ...;
InteractionHand interactionHand = ...;
InteractionResult result = instance.mobInteract(player, interactionHand);

net.minecraft.world.entity.animal.camel.Camel#onPlayerJump(int)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:267
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Player Jump

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isSaddled(), onGround().

Parameters

  • int i

ตัวอย่างใช้งาน

Camel instance = ...;
instance.onPlayerJump(0);

net.minecraft.world.entity.animal.camel.Camel#onSyncedDataUpdated(EntityDataAccessor<?>)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:592
  • Modifiers: public
  • Return: void

คืออะไร

จัดการเหตุการณ์ Synced Data Updated

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: dashCooldown. เรียกต่อ: equals().

Parameters

  • EntityDataAccessor<?> entityDataAccessor

ตัวอย่างใช้งาน

Camel instance = ...;
EntityDataAccessor<?> entityDataAccessor = ...;
instance.onSyncedDataUpdated(entityDataAccessor);

net.minecraft.world.entity.animal.camel.Camel#openCustomInventoryScreen(Player)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:606
  • Modifiers: public
  • Return: void

คืออะไร

เปิด Custom Inventory Screen

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), openHorseInventory().

Parameters

  • Player player

ตัวอย่างใช้งาน

Camel instance = ...;
Player player = ...;
instance.openCustomInventoryScreen(player);

net.minecraft.world.entity.animal.camel.Camel#playStepSound(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:333
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ playStepSound ตาม implementation ของ Camel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: is(), playSound().

Parameters

  • BlockPos blockPos
  • BlockState blockState

ตัวอย่างใช้งาน

BlockPos blockPos = ...;
BlockState blockState = ...;
@Override
protected void playStepSound(BlockPos blockPos, BlockState blockState) {
    super.playStepSound(blockPos, blockState);
}

net.minecraft.world.entity.animal.camel.Camel#readAdditionalSaveData(CompoundTag)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:92
  • Modifiers: public
  • Return: void

คืออะไร

อ่าน Additional Save Data

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getLong(), setPose(), resetLastPoseChangeTick().

Parameters

  • CompoundTag compoundTag

ตัวอย่างใช้งาน

Camel instance = ...;
CompoundTag compoundTag = ...;
instance.readAdditionalSaveData(compoundTag);

net.minecraft.world.entity.animal.camel.Camel#refuseToMove()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:242
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ refuseToMove ตาม implementation ของ Camel

ทำงานยังไง

เรียกต่อ: isCamelSitting(), isInPoseTransition(). คืนค่า: this.isCamelSitting() || this.isInPoseTransition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
boolean result = instance.refuseToMove();

net.minecraft.world.entity.animal.camel.Camel#registerGoals()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:132
  • Modifiers: protected
  • Return: void

คืออะไร

ลงทะเบียน Goals

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void registerGoals() {
    super.registerGoals();
}

net.minecraft.world.entity.animal.camel.Camel#resetLastPoseChangeTick(long)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:574
  • Modifiers: public
  • Return: void

คืออะไร

รีเซ็ต Last Pose Change Tick

ทำงานยังไง

เรียกต่อ: set().

Parameters

  • long l

ตัวอย่างใช้งาน

Camel instance = ...;
instance.resetLastPoseChangeTick(0L);

net.minecraft.world.entity.animal.camel.Camel#sendDebugPackets()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:527
  • Modifiers: protected
  • Return: void

คืออะไร

ส่ง Debug Packets

ทำงานยังไง

เรียกต่อ: sendEntityBrain().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void sendDebugPackets() {
    super.sendDebugPackets();
}

net.minecraft.world.entity.animal.camel.Camel#setDashing(boolean)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:298
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Dashing

ทำงานยังไง

เรียกต่อ: set().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

Camel instance = ...;
instance.setDashing(true);

net.minecraft.world.entity.animal.camel.Camel#sitDown()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:550
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ sitDown ตาม implementation ของ Camel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCamelSitting(), makeSound(), setPose(), gameEvent(), resetLastPoseChangeTick(), level(), getGameTime().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
instance.sitDown();

net.minecraft.world.entity.animal.camel.Camel#standUp()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:559
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ standUp ตาม implementation ของ Camel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCamelSitting(), makeSound(), setPose(), gameEvent(), resetLastPoseChangeTick(), level(), getGameTime().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
instance.standUp();

net.minecraft.world.entity.animal.camel.Camel#standUpInstantly()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:568
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ standUpInstantly ตาม implementation ของ Camel

ทำงานยังไง

เรียกต่อ: setPose(), gameEvent(), resetLastPoseChangeTickToFullStand(), level(), getGameTime().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
instance.standUpInstantly();

net.minecraft.world.entity.animal.camel.Camel#tick()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:159
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: dashCooldown. เรียกต่อ: isDashing(), onGround(), isInLiquid(), isPassenger(), setDashing(), level(), playSound(), blockPosition().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Camel instance = ...;
instance.tick();

net.minecraft.world.entity.animal.camel.Camel#tickRidden(Player,Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:234
  • Modifiers: protected
  • Return: void

คืออะไร

ประมวลผล tick Ridden

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCamelSitting(), isInPoseTransition(), standUp().

Parameters

  • Player player
  • Vec3 vec3

ตัวอย่างใช้งาน

Player player = ...;
Vec3 vec3 = ...;
@Override
protected void tickRidden(Player player, Vec3 vec3) {
    super.tickRidden(player, vec3);
}

net.minecraft.world.entity.animal.camel.Camel#travel(Vec3)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:224
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ travel ตาม implementation ของ Camel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: refuseToMove(), onGround(), setDeltaMovement(), getDeltaMovement(), multiply().

Parameters

  • Vec3 vec3

ตัวอย่างใช้งาน

Camel instance = ...;
Vec3 vec3 = ...;
instance.travel(vec3);

net.minecraft.world.entity.animal.camel.Camel#updateWalkAnimation(float)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/Camel.java:212
  • Modifiers: protected
  • Return: void

คืออะไร

อัปเดต Walk Animation

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getPose(), isStarted(), min(), update(), isBaby().

Parameters

  • float f

ตัวอย่างใช้งาน

@Override
protected void updateWalkAnimation(float f) {
    super.updateWalkAnimation(f);
}

CamelAi

  • Full name: net.minecraft.world.entity.animal.camel.CamelAi
  • Package: net.minecraft.world.entity.animal.camel
  • Source: commonnet/minecraft/world/entity/animal/camel/CamelAi.java
  • Type: class
  • Modifiers: public

net.minecraft.world.entity.animal.camel.CamelAi#brainProvider()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:67
  • Modifiers: public static
  • Return: Brain.Provider<Camel>

คืออะไร

ดำเนินการ brainProvider ตาม implementation ของ CamelAi

ทำงานยังไง

เรียกต่อ: provider(). คืนค่า: Brain.provider(MEMORY_TYPES, SENSOR_TYPES).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Brain.Provider<Camel> result = CamelAi.brainProvider();

net.minecraft.world.entity.animal.camel.CamelAi#getTemptations()

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:131
  • Modifiers: public static
  • Return: Predicate<ItemStack>

คืออะไร

อ่านค่า Temptations

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: itemStack -> itemStack.is(ItemTags.CAMEL_FOOD).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Predicate<ItemStack> result = CamelAi.getTemptations();

net.minecraft.world.entity.animal.camel.CamelAi#initMemories(Camel,RandomSource)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:64
  • Modifiers: protected static
  • Return: void

คืออะไร

ดำเนินการ initMemories ตาม implementation ของ CamelAi

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Camel camel
  • RandomSource randomSource

ตัวอย่างใช้งาน

Camel camel = ...;
RandomSource randomSource = ...;
@Override
protected void initMemories(Camel camel, RandomSource randomSource) {
    super.initMemories(camel, randomSource);
}

net.minecraft.world.entity.animal.camel.CamelAi#makeBrain(Brain<Camel>)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:71
  • Modifiers: protected static
  • Return: Brain<?>

คืออะไร

สร้าง Brain

ทำงานยังไง

เรียกต่อ: initCoreActivity(), initIdleActivity(), setCoreActivities(), of(), setDefaultActivity(), useDefaultActivity(). คืนค่า: brain.

Parameters

  • Brain<Camel> brain

ตัวอย่างใช้งาน

Brain<Camel> brain = ...;
@Override
protected Brain<?> makeBrain(Brain<Camel> brain) {
    return super.makeBrain(brain);
}

net.minecraft.world.entity.animal.camel.CamelAi#updateActivity(Camel)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:127
  • Modifiers: public static
  • Return: void

คืออะไร

อัปเดต Activity

ทำงานยังไง

เรียกต่อ: getBrain(), setActiveActivityToFirstValid(), of().

Parameters

  • Camel camel

ตัวอย่างใช้งาน

Camel camel = ...;
CamelAi.updateActivity(camel);

CamelAi$CamelPanic

  • Full name: net.minecraft.world.entity.animal.camel.CamelAi$CamelPanic
  • Package: net.minecraft.world.entity.animal.camel
  • Source: commonnet/minecraft/world/entity/animal/camel/CamelAi.java
  • Type: class
  • Modifiers: public static
  • Extends: AnimalPanic<Camel>

net.minecraft.world.entity.animal.camel.CamelAi$CamelPanic#CamelPanic(float)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:136
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CamelAi.CamelPanic ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • float f

ตัวอย่างใช้งาน

CamelAi.CamelPanic instance = new CamelAi.CamelPanic(0.0F);

net.minecraft.world.entity.animal.camel.CamelAi$CamelPanic#start(ServerLevel,Camel,long)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:140
  • Modifiers: protected
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: standUpInstantly().

Parameters

  • ServerLevel serverLevel
  • Camel camel
  • long l

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
Camel camel = ...;
@Override
protected void start(ServerLevel serverLevel, Camel camel, long l) {
    super.start(serverLevel, camel, l);
}

CamelAi$RandomSitting

  • Full name: net.minecraft.world.entity.animal.camel.CamelAi$RandomSitting
  • Package: net.minecraft.world.entity.animal.camel
  • Source: commonnet/minecraft/world/entity/animal/camel/CamelAi.java
  • Type: class
  • Modifiers: public static
  • Extends: Behavior<Camel>

net.minecraft.world.entity.animal.camel.CamelAi$RandomSitting#checkExtraStartConditions(ServerLevel,Camel)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:154
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบ Extra Start Conditions

ทำงานยังไง

เรียกต่อ: isInWater(), getPoseTime(), isLeashed(), onGround(), hasControllingPassenger(), canCamelChangePose().

Parameters

  • ServerLevel serverLevel
  • Camel camel

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
Camel camel = ...;
@Override
protected boolean checkExtraStartConditions(ServerLevel serverLevel, Camel camel) {
    return super.checkExtraStartConditions(serverLevel, camel);
}

net.minecraft.world.entity.animal.camel.CamelAi$RandomSitting#RandomSitting(int)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:149
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ CamelAi.RandomSitting ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: minimalPoseTicks. เรียกต่อ: of().

Parameters

  • int i

ตัวอย่างใช้งาน

CamelAi.RandomSitting instance = new CamelAi.RandomSitting(0);

net.minecraft.world.entity.animal.camel.CamelAi$RandomSitting#start(ServerLevel,Camel,long)

  • Origin: common
  • Source: net/minecraft/world/entity/animal/camel/CamelAi.java:163
  • Modifiers: protected
  • Return: void

คืออะไร

เริ่ม start

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isCamelSitting(), standUp(), isPanicking(), sitDown().

Parameters

  • ServerLevel serverLevel
  • Camel camel
  • long l

ตัวอย่างใช้งาน

ServerLevel serverLevel = ...;
Camel camel = ...;
@Override
protected void start(ServerLevel serverLevel, Camel camel, long l) {
    super.start(serverLevel, camel, l);
}