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 floatprivate Vec3private final TargetingConditionsprivate final floatstatic final intFields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
ConstructorsConstructorDescriptionRamTarget(Function<Goat, UniformInt> getTimeBetweenRams, TargetingConditions ramTargeting, float speed, ToDoubleFunction<Goat> getKnockbackForce, Function<Goat, SoundEvent> getImpactSound, Function<Goat, SoundEvent> getHornBreakSound) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, Goat entity, long gameTime) protected booleancheckExtraStartConditions(ServerLevel level, Goat owner) protected voidfinishRam(ServerLevel level, Goat owner) private booleanhasRammedHornBreakingBlock(ServerLevel level, Goat owner) protected voidstart(ServerLevel level, Goat entity, long gameTime) protected voidtick(ServerLevel level, Goat owner, long gameTime) 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> getTimeBetweenRams, TargetingConditions ramTargeting, float speed, ToDoubleFunction<Goat> getKnockbackForce, Function<Goat, SoundEvent> getImpactSound, Function<Goat, SoundEvent> getHornBreakSound)
-
-
Method Details