Package org.bukkit.entity
Interface Piglin
-
- All Superinterfaces:
Attributable
,CommandSender
,Creature
,Damageable
,Entity
,LivingEntity
,Lootable
,Metadatable
,Mob
,Monster
,Nameable
,Permissible
,PersistentDataHolder
,ProjectileSource
,ServerOperator
public interface Piglin extends Monster
Represents a Piglin.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getConversionTime()
Gets the amount of ticks until this entity will be converted to a Zombified Piglin.boolean
isAbleToHunt()
Get whether the piglin is able to hunt hoglins.boolean
isBaby()
Gets whether the piglin is a babyboolean
isConverting()
Get if this entity is in the process of converting to a Zombified Piglin.boolean
isImmuneToZombification()
Gets whether the piglin is immune to zombification.void
setBaby(boolean flag)
Sets whether the piglin is a babyvoid
setConversionTime(int time)
Sets the amount of ticks until this entity will be converted to a Zombified Piglin.void
setImmuneToZombification(boolean flag)
Sets whether the piglin is immune to zombification.void
setIsAbleToHunt(boolean flag)
Sets whether the piglin is able to hunt hoglins.-
Methods inherited from interface org.bukkit.attribute.Attributable
getAttribute
-
Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage
-
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
-
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport
-
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, getActivePotionEffects, getCanPickupItems, getCollidableExemptions, getEquipment, getEyeHeight, getEyeHeight, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getTargetBlock, getTargetBlockExact, getTargetBlockExact, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isLeashed, isRiptiding, isSleeping, isSwimming, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setCanPickupItems, setCollidable, setGliding, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setSwimming, swingMainHand, swingOffHand
-
Methods inherited from interface org.bukkit.loot.Lootable
getLootTable, getSeed, setLootTable, setSeed
-
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Methods inherited from interface org.bukkit.Nameable
getCustomName, setCustomName
-
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
-
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
-
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
-
-
-
Method Detail
-
isImmuneToZombification
boolean isImmuneToZombification()
Gets whether the piglin is immune to zombification.- Returns:
- Whether the piglin is immune to zombification
-
setImmuneToZombification
void setImmuneToZombification(boolean flag)
Sets whether the piglin is immune to zombification.- Parameters:
flag
- Whether the piglin is immune to zombification
-
isAbleToHunt
boolean isAbleToHunt()
Get whether the piglin is able to hunt hoglins.- Returns:
- Whether the piglin is able to hunt hoglins
-
setIsAbleToHunt
void setIsAbleToHunt(boolean flag)
Sets whether the piglin is able to hunt hoglins.- Parameters:
flag
- Whether the piglin is able to hunt hoglins.
-
getConversionTime
int getConversionTime()
Gets the amount of ticks until this entity will be converted to a Zombified Piglin. When this reaches 300, the entity will be converted.- Returns:
- conversion time
- Throws:
IllegalStateException
- ifisConverting()
is false.
-
setConversionTime
void setConversionTime(int time)
Sets the amount of ticks until this entity will be converted to a Zombified Piglin. When this reaches 0, the entity will be converted. A value of less than 0 will stop the current conversion process without converting the current entity.- Parameters:
time
- new conversion time
-
isConverting
boolean isConverting()
Get if this entity is in the process of converting to a Zombified Piglin.- Returns:
- conversion status
-
isBaby
boolean isBaby()
Gets whether the piglin is a baby- Returns:
- Whether the piglin is a baby
-
setBaby
void setBaby(boolean flag)
Sets whether the piglin is a baby- Parameters:
flag
- Whether the piglin is a baby
-
-