Package net.minecraft.entity.passive
Class RabbitEntity
- java.lang.Object
-
- All Implemented Interfaces:
ICommandSource
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeEntity
,INBTSerializable<CompoundNBT>
public class RabbitEntity extends AnimalEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
RabbitEntity.AvoidEntityGoal<T extends LivingEntity>
(package private) static class
RabbitEntity.EvilAttackGoal
class
RabbitEntity.JumpHelperController
(package private) static class
RabbitEntity.MoveHelperController
(package private) static class
RabbitEntity.PanicGoal
static class
RabbitEntity.RabbitData
(package private) static class
RabbitEntity.RaidFarmGoal
-
Nested classes/interfaces inherited from class net.minecraft.entity.AgeableEntity
AgeableEntity.AgeableData
-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
Fields Modifier and Type Field Description private static DataParameter<java.lang.Integer>
DATA_TYPE_ID
private int
jumpDelayTicks
private int
jumpDuration
private int
jumpTicks
private static ResourceLocation
KILLER_BUNNY
private int
moreCarrotTicks
private boolean
wasOnGround
-
Fields inherited from class net.minecraft.entity.AgeableEntity
age, forcedAge, forcedAgeTimer
-
Fields inherited from class net.minecraft.entity.MobEntity
ambientSoundTime, armorDropChances, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector, xpReward
-
Fields inherited from class net.minecraft.entity.LivingEntity
animationPosition, animationSpeed, animationSpeedOld, animStep, animStepO, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, deathScore, deathTime, fallFlyTicks, flyingSpeed, hurtDir, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYRot, lerpZ, lyHeadRot, noActionTime, oAttackAnim, oRun, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, swinging, swingingArm, swingTime, timeOffs, useItem, useItemRemaining, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
-
Fields inherited from class net.minecraft.entity.Entity
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description RabbitEntity(EntityType<? extends RabbitEntity> p_i50247_1_, World p_i50247_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalSaveData(CompoundNBT p_213281_1_)
void
aiStep()
boolean
canSpawnSprintParticle()
private void
checkLandingDelay()
static boolean
checkRabbitSpawnRules(EntityType<RabbitEntity> p_223321_0_, IWorld p_223321_1_, SpawnReason p_223321_2_, BlockPos p_223321_3_, java.util.Random p_223321_4_)
static AttributeModifierMap.MutableAttribute
createAttributes()
void
customServerAiStep()
protected void
defineSynchedData()
private void
disableJumpControl()
boolean
doHurtTarget(Entity p_70652_1_)
private void
enableJumpControl()
private void
facePoint(double p_175533_1_, double p_175533_3_)
ILivingEntityData
finalizeSpawn(IServerWorld p_213386_1_, DifficultyInstance p_213386_2_, SpawnReason p_213386_3_, ILivingEntityData p_213386_4_, CompoundNBT p_213386_5_)
protected SoundEvent
getAmbientSound()
RabbitEntity
getBreedOffspring(ServerWorld p_241840_1_, AgeableEntity p_241840_2_)
protected SoundEvent
getDeathSound()
protected SoundEvent
getHurtSound(DamageSource p_184601_1_)
float
getJumpCompletion(float p_175521_1_)
protected float
getJumpPower()
protected SoundEvent
getJumpSound()
Vector3d
getLeashOffset()
int
getRabbitType()
private int
getRandomRabbitType(IWorld p_213610_1_)
SoundCategory
getSoundSource()
void
handleEntityEvent(byte p_70103_1_)
boolean
hurt(DamageSource p_70097_1_, float p_70097_2_)
boolean
isFood(ItemStack p_70877_1_)
private boolean
isTemptingItem(Item p_175525_1_)
protected void
jumpFromGround()
void
readAdditionalSaveData(CompoundNBT p_70037_1_)
protected void
registerGoals()
void
setJumping(boolean p_70637_1_)
private void
setLandingDelay()
void
setRabbitType(int p_175529_1_)
void
setSpeedModifier(double p_175515_1_)
void
startJumping()
private boolean
wantsMoreFood()
-
Methods inherited from class net.minecraft.entity.passive.AnimalEntity
canFallInLove, canMate, checkAnimalSpawnRules, getAmbientSoundInterval, getExperienceReward, getInLoveTime, getLoveCause, getMyRidingOffset, getWalkTargetValue, isInLove, mobInteract, removeWhenFarAway, resetLove, setInLove, setInLoveTime, spawnChildFromBreeding, usePlayerItem
-
Methods inherited from class net.minecraft.entity.AgeableEntity
ageBoundaryReached, ageUp, ageUp, canBreed, getAge, isBaby, onSyncedDataUpdated, setAge, setBaby
-
Methods inherited from class net.minecraft.entity.CreatureEntity
checkSpawnRules, followLeashSpeed, getWalkTargetValue, isPathFinding, onLeashDistance, tickLeash
-
Methods inherited from class net.minecraft.entity.MobEntity
ate, baseTick, canAttack, canAttackType, canBeControlledByRider, canBeLeashed, canCutCorner, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, canTakeItem, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, convertTo, createBodyControl, createLootContext, createMobAttributes, createNavigation, dropCustomDeathLoot, dropFromLootTable, dropLeash, enchantSpawnedArmor, enchantSpawnedWeapon, equipItemIfPossible, getArmorSlots, getDefaultLootTable, getEquipmentDropChance, getEquipmentForSlot, getEquipmentSlotForItem, getHandSlots, getHeadRotSpeed, getItemBySlot, getJumpControl, getLeashHolder, getLookControl, getLootTable, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMaxSpawnClusterSize, getMoveControl, getNavigation, getPathfindingMalus, getRestrictCenter, getRestrictRadius, getSensing, getTarget, hasRestriction, interact, isAggressive, isControlledByLocalInstance, isEffectiveAi, isLeashed, isLeftHanded, isMaxGroupSizeReached, isNoAi, isPersistenceRequired, isSunBurnTick, isValidSlotForItem, isWithinRestriction, isWithinRestriction, jumpInLiquid, lookAt, onOffspringSpawnedFromEgg, pickUpItem, playAmbientSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, removeAfterChangingDimensions, requiresCustomPersistence, restrictTo, sendDebugPackets, serverAiStep, setAggressive, setCanPickUpLoot, setDelayedLeashHolderId, setDropChance, setGuaranteedDrop, setItemSlot, setItemSlotAndDropWhenKilled, setLeashedTo, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSlot, setSpeed, setTarget, setXxa, setYya, setZza, shouldDespawnInPeaceful, shouldPassengersInheritMalus, spawnAnim, startRiding, tick, tickHeadTurn, updateControlFlags, wantsToPickUp
-
Methods inherited from class net.minecraft.entity.LivingEntity
actuallyHurt, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canBeAffected, canBreatheUnderwater, canSee, canSpawnSoulSpeedParticle, canStandOnFluid, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, die, doAutoAttackOnTouch, doPush, dropAllDeathLoot, dropEquipment, dropExperience, eat, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getAddEntityPacket, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBoundingBoxForCulling, getBrain, getCapability, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDimensions, getDismountPoses, getDrinkingSound, getEatingSound, getEffect, getEyeHeight, getFallDamageSound, getFallFlyingTicks, getFeetBlockState, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getKillCredit, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxHealth, getMobType, getNoActionTime, getOffhandItem, getProjectile, getRandom, getRelativePortalPosition, getScale, getSleepingPos, getSoundVolume, getSpeed, getStandingEyeHeight, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, heal, hurtArmor, hurtCurrentlyUsedShield, increaseAirSupply, invalidateCaps, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBlocking, isDeadOrDying, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, kill, knockback, lerpHeadTo, lerpTo, lookAt, makeBrain, markHurt, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onItemPickup, onLeaveCombat, onSoulSpeedBlock, outOfWorld, playBlockFallSound, playEquipSound, push, pushEntities, randomTeleport, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, rideableUnderWater, rideTick, setAbsorptionAmount, setArrowCount, setHealth, setItemInHand, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setOnGround, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDropExperience, shouldDropLoot, shouldRemoveSoulSpeed, shouldRiderFaceForward, shouldShowName, spawnSoulSpeedParticle, startAutoSpinAttack, startSleeping, startUsingItem, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, travel, triggerItemUseEffects, tryAddSoulSpeed, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime
-
Methods inherited from class net.minecraft.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLightProbePosition, getLookAngle, getMaxAirSupply, getMotionDirection, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getY, getY, getZ, getZ, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isMovementNoisy, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killed, lavaHurt, lerpMotion, limitPistonMovement, load, makeFlySound, makeStuckInBlock, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playerTouch, playFlySound, playSound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, push, reapplyPosition, refreshDimensions, remove, remove, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setLevel, setLocationFromBoundingbox, setNoGravity, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSwimming, setUUID, setViewScale, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
-
-
-
Field Detail
-
DATA_TYPE_ID
private static final DataParameter<java.lang.Integer> DATA_TYPE_ID
-
KILLER_BUNNY
private static final ResourceLocation KILLER_BUNNY
-
jumpTicks
private int jumpTicks
-
jumpDuration
private int jumpDuration
-
wasOnGround
private boolean wasOnGround
-
jumpDelayTicks
private int jumpDelayTicks
-
moreCarrotTicks
private int moreCarrotTicks
-
-
Constructor Detail
-
RabbitEntity
public RabbitEntity(EntityType<? extends RabbitEntity> p_i50247_1_, World p_i50247_2_)
-
-
Method Detail
-
registerGoals
protected void registerGoals()
- Overrides:
registerGoals
in classMobEntity
-
getJumpPower
protected float getJumpPower()
- Overrides:
getJumpPower
in classLivingEntity
-
jumpFromGround
protected void jumpFromGround()
- Overrides:
jumpFromGround
in classLivingEntity
-
getJumpCompletion
public float getJumpCompletion(float p_175521_1_)
-
setSpeedModifier
public void setSpeedModifier(double p_175515_1_)
-
setJumping
public void setJumping(boolean p_70637_1_)
- Overrides:
setJumping
in classLivingEntity
-
startJumping
public void startJumping()
-
defineSynchedData
protected void defineSynchedData()
- Overrides:
defineSynchedData
in classAgeableEntity
-
customServerAiStep
public void customServerAiStep()
- Overrides:
customServerAiStep
in classAnimalEntity
-
canSpawnSprintParticle
public boolean canSpawnSprintParticle()
- Overrides:
canSpawnSprintParticle
in classEntity
-
facePoint
private void facePoint(double p_175533_1_, double p_175533_3_)
-
enableJumpControl
private void enableJumpControl()
-
disableJumpControl
private void disableJumpControl()
-
setLandingDelay
private void setLandingDelay()
-
checkLandingDelay
private void checkLandingDelay()
-
aiStep
public void aiStep()
- Overrides:
aiStep
in classAnimalEntity
-
createAttributes
public static AttributeModifierMap.MutableAttribute createAttributes()
-
addAdditionalSaveData
public void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Overrides:
addAdditionalSaveData
in classAnimalEntity
-
readAdditionalSaveData
public void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Overrides:
readAdditionalSaveData
in classAnimalEntity
-
getJumpSound
protected SoundEvent getJumpSound()
-
getAmbientSound
protected SoundEvent getAmbientSound()
- Overrides:
getAmbientSound
in classMobEntity
-
getHurtSound
protected SoundEvent getHurtSound(DamageSource p_184601_1_)
- Overrides:
getHurtSound
in classLivingEntity
-
getDeathSound
protected SoundEvent getDeathSound()
- Overrides:
getDeathSound
in classLivingEntity
-
doHurtTarget
public boolean doHurtTarget(Entity p_70652_1_)
- Overrides:
doHurtTarget
in classMobEntity
-
getSoundSource
public SoundCategory getSoundSource()
- Overrides:
getSoundSource
in classEntity
-
hurt
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
- Overrides:
hurt
in classAnimalEntity
-
isTemptingItem
private boolean isTemptingItem(Item p_175525_1_)
-
getBreedOffspring
public RabbitEntity getBreedOffspring(ServerWorld p_241840_1_, AgeableEntity p_241840_2_)
- Specified by:
getBreedOffspring
in classAgeableEntity
-
isFood
public boolean isFood(ItemStack p_70877_1_)
- Overrides:
isFood
in classAnimalEntity
-
getRabbitType
public int getRabbitType()
-
setRabbitType
public void setRabbitType(int p_175529_1_)
-
finalizeSpawn
@Nullable public ILivingEntityData finalizeSpawn(IServerWorld p_213386_1_, DifficultyInstance p_213386_2_, SpawnReason p_213386_3_, @Nullable ILivingEntityData p_213386_4_, @Nullable CompoundNBT p_213386_5_)
- Overrides:
finalizeSpawn
in classAgeableEntity
-
getRandomRabbitType
private int getRandomRabbitType(IWorld p_213610_1_)
-
checkRabbitSpawnRules
public static boolean checkRabbitSpawnRules(EntityType<RabbitEntity> p_223321_0_, IWorld p_223321_1_, SpawnReason p_223321_2_, BlockPos p_223321_3_, java.util.Random p_223321_4_)
-
wantsMoreFood
private boolean wantsMoreFood()
-
handleEntityEvent
public void handleEntityEvent(byte p_70103_1_)
- Overrides:
handleEntityEvent
in classAnimalEntity
-
getLeashOffset
public Vector3d getLeashOffset()
- Overrides:
getLeashOffset
in classEntity
-
-