Interface Pig
- All Superinterfaces:
Ageable, Animal, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider
A pig (
minecraft:pig): it looks and sounds after the biome it spawned in.
Like every entity, change it from the region thread owning its chunk.
- Since:
- 0.1.0
-
Field Summary
Fields inherited from interface Ageable
BABY_START_AGEFields inherited from interface Animal
LOVE_TICKS -
Method Summary
Modifier and TypeMethodDescriptionvoidsetSoundVariant(TypedKey<PigSoundVariant> soundVariant) Changes how this pig sounds.voidsetVariant(TypedKey<PigVariant> variant) Changes how this pig looks.Returns how this pig sounds.variant()Returns how this pig looks.Methods inherited from interface Ageable
age, isAgeLocked, isBaby, setAge, setAgeLocked, setBabyMethods inherited from interface Animal
inLoveTime, isFood, isInLove, isPanicking, loveCause, resetLove, setInLoveMethods inherited from interface Entity
chunk, displayName, entityId, isRemoved, location, remove, server, teleport, teleport, teleport, type, uuid, worldMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface LivingEntity
absorptionAmount, activeEffects, addEffect, armor, armorToughness, clearEffects, damage, effect, equipment, fireTicks, hasEffect, headYaw, heal, health, isAlive, isDead, kill, knockbackResistance, maxHealth, removeEffect, setAbsorptionAmount, setFireTicks, setHeadYaw, setHealthMethods inherited from interface Mob
attackDamage, behaviour, behaviours, definition, distanceSqTo, followRange, goals, hasLineOfSightTo, height, lookAt, lookAt, movementSpeed, navigateTo, navigation, nearestPlayer, onGround, playSound, setFollowRange, setMoveSpeed, setTarget, setVelocity, target, velocityX, velocityY, velocityZ, widthMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Sound.Source.Provider
soundSource
-
Method Details
-
variant
-
setVariant
Changes how this pig looks.- Parameters:
variant- the new look- Since:
- 0.1.0
-
soundVariant
TypedKey<PigSoundVariant> soundVariant()Returns how this pig sounds.- Returns:
- how this pig sounds
- Since:
- 0.1.0
-
setSoundVariant
Changes how this pig sounds.- Parameters:
soundVariant- the new sounds- Since:
- 0.1.0
-