Interface Zombie
- All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Mob, SchedulerSource, Sound.Emitter, Sound.Source.Provider
A zombie (
minecraft:zombie), or one of its kin: the husk, the drowned and the frostbite.
Some zombies are babies, faster and smaller; some lead the others. A zombie that keeps its eyes under water for 30 seconds turns into its drowned form, and one that stays in powder snow for 7 seconds into its frozen form.
Like every entity, change it from the region thread owning its chunk.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this zombie breaks the wooden doors in its way.booleanisBaby()Returnstruefor a baby zombie.booleanReturnstruewhile this zombie shakes in powder snow, about to turn into its frozen form.booleanisLeader()Returnstrueif this zombie leads the others.booleanReturnstruewhile this zombie shakes under water, about to turn into its drowned form.doubleReturns the chance, between0and1, that this zombie calls a reinforcement when it is hurt on hard difficulty.voidsetBaby(boolean baby) Makes this zombie a baby, or an adult again.voidsetCanBreakDoors(boolean canBreakDoors) Lets this zombie break the wooden doors in its way, on hard difficulty.voidsetFreezingTime(int ticks) Sets for how many ticks this zombie has been in powder snow; it starts to turn into its frozen form at 140.voidsetInWaterTime(int ticks) Sets for how many ticks this zombie has had its eyes under water; it starts to turn into its drowned form at 600.voidsetReinforcementChance(double chance) Sets how likely this zombie calls a reinforcement, whatever was rolled for it.Methods 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
-
isBaby
boolean isBaby()Returnstruefor a baby zombie.- Returns:
truefor a baby zombie- Since:
- 0.1.0
-
setBaby
void setBaby(boolean baby) Makes this zombie a baby, or an adult again.- Parameters:
baby-truefor a baby- Since:
- 0.1.0
-
isLeader
boolean isLeader()Returnstrueif this zombie leads the others.: it has more health, calls for reinforcements far more often and breaks doors- Returns:
trueif this zombie leads the others- Since:
- 0.1.0
-
canBreakDoors
boolean canBreakDoors()Returnstrueif this zombie breaks the wooden doors in its way., which it only does on hard difficulty- Returns:
trueif this zombie breaks the wooden doors in its way- Since:
- 0.1.0
-
setCanBreakDoors
void setCanBreakDoors(boolean canBreakDoors) Lets this zombie break the wooden doors in its way, on hard difficulty.- Parameters:
canBreakDoors-trueto let it- Since:
- 0.1.0
-
reinforcementChance
double reinforcementChance()Returns the chance, between0and1, that this zombie calls a reinforcement when it is hurt on hard difficulty.- Returns:
- the chance, between
0and1, that this zombie calls a reinforcement when it is hurt on hard difficulty - Since:
- 0.1.0
-
setReinforcementChance
void setReinforcementChance(double chance) Sets how likely this zombie calls a reinforcement, whatever was rolled for it.- Parameters:
chance- the chance, between0and1- Since:
- 0.1.0
-
isUnderWaterConverting
boolean isUnderWaterConverting()Returnstruewhile this zombie shakes under water, about to turn into its drowned form.- Returns:
truewhile this zombie shakes under water, about to turn into its drowned form- Since:
- 0.1.0
-
isFreezeConverting
boolean isFreezeConverting()Returnstruewhile this zombie shakes in powder snow, about to turn into its frozen form.- Returns:
truewhile this zombie shakes in powder snow, about to turn into its frozen form- Since:
- 0.1.0
-
setInWaterTime
void setInWaterTime(int ticks) Sets for how many ticks this zombie has had its eyes under water; it starts to turn into its drowned form at 600.- Parameters:
ticks- the time under water- Since:
- 0.1.0
-
setFreezingTime
void setFreezingTime(int ticks) Sets for how many ticks this zombie has been in powder snow; it starts to turn into its frozen form at 140.- Parameters:
ticks- the time in powder snow- Since:
- 0.1.0
-