ForceUnmount .java

net.minecraft.world.entity.ai.behavior.warden.ForceUnmount (class, 23 lines): members: checkExtraStartConditions, start. imports: Behavior, ImmutableMap.

net.minecraft.world.entity.ai.behavior.wardenclass23 linescommonextends Behavior<LivingEntity>641 B

API Surface (2)

boolean checkExtraStartConditions(final ServerLevel level, final LivingEntity body)
void start(final ServerLevel level, final LivingEntity body, final long timestamp)

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ForceUnmount.java23 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.entity.ai.behavior.warden;
2
3
import com.google.common.collect.ImmutableMap;
4
import net.minecraft.server.level.ServerLevel;
5
import net.minecraft.world.entity.LivingEntity;
6
import net.minecraft.world.entity.ai.behavior.Behavior;
7
8
public class ForceUnmount extends Behavior<LivingEntity> {
9
	public ForceUnmount() {
10
		super(ImmutableMap.of());
11
	}
12
13
	@Override
14
	protected boolean checkExtraStartConditions(final ServerLevel level, final LivingEntity body) {
15
		return body.isPassenger();
16
	}
17
18
	@Override
19
	protected void start(final ServerLevel level, final LivingEntity body, final long timestamp) {
20
		body.unRide();
21
	}
22
}
23

Decompiled Minecraft 26.3 source of ForceUnmount (net/minecraft/world/entity/ai/behavior/warden/ForceUnmount.java) with Mojang official mappings, stored verbatim on the site.