Class CatEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.LivingEntity
org.geysermc.geyser.entity.type.living.MobEntity
org.geysermc.geyser.entity.type.living.CreatureEntity
org.geysermc.geyser.entity.type.living.AgeableEntity
org.geysermc.geyser.entity.type.living.animal.AnimalEntity
org.geysermc.geyser.entity.type.living.animal.tameable.TameableEntity
org.geysermc.geyser.entity.type.living.animal.tameable.CatEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity
-
Field Summary
Fields inherited from class org.geysermc.geyser.entity.type.living.animal.tameable.TameableEntity
ownerBedrockIdFields inherited from class org.geysermc.geyser.entity.type.LivingEntity
boots, chestplate, hand, health, helmet, leggings, maxHealth, offHand -
Constructor Summary
ConstructorsConstructorDescriptionCatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected floatThe scale that should be used when this entity is not a baby.protected floatThe scale that should be used when this entity is a baby.protected voidCalled on entity spawn.protected @NonNull InteractionResultmobInteract(@NonNull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand) voidsetCatVariant(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) voidsetCollarColor(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) voidsetResting(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) voidsetTameableFlags(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata) protected @NonNull InteractiveTagtestMobInteraction(@NonNull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand) voidupdateRotation(float yaw, float pitch, boolean isOnGround) Updates an entity's rotation.Methods inherited from class org.geysermc.geyser.entity.type.living.animal.tameable.TameableEntity
canBeLeashed, getOwnerBedrockId, setOwnerMethods inherited from class org.geysermc.geyser.entity.type.living.animal.AnimalEntity
canEatMethods inherited from class org.geysermc.geyser.entity.type.living.AgeableEntity
isBaby, setBabyMethods inherited from class org.geysermc.geyser.entity.type.living.MobEntity
getLeashHolderBedrockId, interact, isEnemy, isNotLeashed, setLeashHolderBedrockId, setMobFlags, testInteractionMethods inherited from class org.geysermc.geyser.entity.type.LivingEntity
calculateAttribute, checkInteractWithNameTag, createHealthAttribute, getBoots, getChestplate, getHand, getHelmet, getLeggings, getOffHand, hasShield, isAlive, isMaxFrozenState, isShaking, setBedPosition, setBoots, setChestplate, setDimensions, setFreezing, setHand, setHealth, setHelmet, setLeggings, setLivingEntityFlags, setMaxFrozenState, setMaxHealth, setOffHand, updateArmor, updateAttribute, updateBedrockAttributes, updateMainHand, updateOffHandMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, as, despawnEntity, getBedrockRotation, getBoundingBoxHeight, getBoundingBoxWidth, getDefinition, getDirtyMetadata, getEntityId, getFlag, getGeyserId, getHeadYaw, getMaxAir, getMotion, getNametag, getPassengers, getPitch, getPosition, getSession, getUuid, getVehicle, getYaw, interactAt, isOnGround, isSilent, isValid, javaId, moveAbsolute, moveAbsolute, moveRelative, moveRelative, playEntityEvent, playEntityEvent, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setDefinition, setDisplayName, setDisplayNameVisible, setEntityId, setFlag, setFlags, setFlagsDirty, setGravity, setHeadYaw, setInvisible, setMotion, setOnGround, setPassengers, setPitch, setPose, setPosition, setRiderSeatPosition, setSilent, setUuid, setValid, setVehicle, setYaw, spawnEntity, teleport, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updatePassengerOffsets, updatePositionAndRotation
-
Constructor Details
-
CatEntity
public CatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw)
-
-
Method Details
-
initializeMetadata
protected void initializeMetadata()Description copied from class:EntityCalled on entity spawn. Used to populate the entity metadata and flags with default values.- Overrides:
initializeMetadatain classAgeableEntity
-
updateRotation
public void updateRotation(float yaw, float pitch, boolean isOnGround) Description copied from class:EntityUpdates an entity's rotation. Used in JavaMoveEntityRotTranslator.- Overrides:
updateRotationin classEntity- Parameters:
yaw- The new yaw of the entity.pitch- The new pitch of the entity.isOnGround- Whether the entity is currently on the ground.
-
getAdultSize
protected float getAdultSize()Description copied from class:AgeableEntityThe scale that should be used when this entity is not a baby.- Overrides:
getAdultSizein classAgeableEntity
-
getBabySize
protected float getBabySize()Description copied from class:AgeableEntityThe scale that should be used when this entity is a baby.- Overrides:
getBabySizein classAgeableEntity
-
setTameableFlags
public void setTameableFlags(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ByteEntityMetadata entityMetadata) - Overrides:
setTameableFlagsin classTameableEntity
-
setCatVariant
public void setCatVariant(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
setResting
public void setResting(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata) -
setCollarColor
public void setCollarColor(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
canEat
- Overrides:
canEatin classAnimalEntity- Returns:
- true if this is a valid item to breed with for this animal.
-
testMobInteraction
protected @NonNull InteractiveTag testMobInteraction(@NonNull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand) - Overrides:
testMobInteractionin classAnimalEntity
-
mobInteract
protected @NonNull InteractionResult mobInteract(@NonNull com.github.steveice10.mc.protocol.data.game.entity.player.Hand hand, @NonNull GeyserItemStack itemInHand) - Overrides:
mobInteractin classAnimalEntity
-