Class RamTarget
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Goat>
net.minecraft.world.entity.ai.behavior.RamTarget
- All Implemented Interfaces:
BehaviorControl<Goat>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function
<Goat, SoundEvent> private final Function
<Goat, SoundEvent> private final ToDoubleFunction
<Goat> private final Function
<Goat, UniformInt> static final float
private Vec3
private final TargetingConditions
private final float
static final int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorsConstructorDescriptionRamTarget
(Function<Goat, UniformInt> pGetTimeBetweenRams, TargetingConditions pRamTargeting, float pSpeed, ToDoubleFunction<Goat> pGetKnockbackForce, Function<Goat, SoundEvent> pGetImpactSound, Function<Goat, SoundEvent> pGetHornBreakSound) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel pLevel, Goat pEntity, long pGameTime) protected boolean
checkExtraStartConditions
(ServerLevel pLevel, Goat pOwner) protected void
finishRam
(ServerLevel pLevel, Goat pOwner) private boolean
hasRammedHornBreakingBlock
(ServerLevel pLevel, Goat pOwner) protected void
start
(ServerLevel pLevel, Goat pEntity, long pGameTime) protected void
tick
(ServerLevel pLevel, Goat pOwner, long pGameTime) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, stop, tickOrStop, timedOut, tryStart
-
Field Details
-
TIME_OUT_DURATION
public static final int TIME_OUT_DURATION- See Also:
-
RAM_SPEED_FORCE_FACTOR
public static final float RAM_SPEED_FORCE_FACTOR- See Also:
-
getTimeBetweenRams
-
ramTargeting
-
speed
private final float speed -
getKnockbackForce
-
ramDirection
-
getImpactSound
-
getHornBreakSound
-
-
Constructor Details
-
RamTarget
public RamTarget(Function<Goat, UniformInt> pGetTimeBetweenRams, TargetingConditions pRamTargeting, float pSpeed, ToDoubleFunction<Goat> pGetKnockbackForce, Function<Goat, SoundEvent> pGetImpactSound, Function<Goat, SoundEvent> pGetHornBreakSound)
-
-
Method Details