DragonHoverPhase .java

net.minecraft.world.entity.boss.enderdragon.phases.DragonHoverPhase (class): members: getFlySpeed, targetLocation, getFlyTargetLocation, isSitting, begin.

net.minecraft.world.entity.boss.enderdragon.phasesclass47 linescommonextends AbstractDragonPhaseInstance983 B

API Surface (5)

void doServerTick(final ServerLevel level)
boolean isSitting()
void begin()
float getFlySpeed()
EnderDragonPhase<DragonHoverPhase> getPhase()

Fields & Constants (1)

targetLocation

Code Graph: Dependencies (5)

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

Full Source

DragonHoverPhase.java47 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.entity.boss.enderdragon.phases;
2
3
import net.minecraft.server.level.ServerLevel;
4
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
5
import net.minecraft.world.phys.Vec3;
6
import org.jspecify.annotations.Nullable;
7
8
public class DragonHoverPhase extends AbstractDragonPhaseInstance {
9
	private @Nullable Vec3 targetLocation;
10
11
	public DragonHoverPhase(final EnderDragon dragon) {
12
		super(dragon);
13
	}
14
15
	@Override
16
	public void doServerTick(final ServerLevel level) {
17
		if (this.targetLocation == null) {
18
			this.targetLocation = this.dragon.position();
19
		}
20
	}
21
22
	@Override
23
	public boolean isSitting() {
24
		return true;
25
	}
26
27
	@Override
28
	public void begin() {
29
		this.targetLocation = null;
30
	}
31
32
	@Override
33
	public float getFlySpeed() {
34
		return 1.0F;
35
	}
36
37
	@Override
38
	public @Nullable Vec3 getFlyTargetLocation() {
39
		return this.targetLocation;
40
	}
41
42
	@Override
43
	public EnderDragonPhase<DragonHoverPhase> getPhase() {
44
		return EnderDragonPhase.HOVERING;
45
	}
46
}
47

Decompiled Minecraft 26.3 source of DragonHoverPhase (net/minecraft/world/entity/boss/enderdragon/phases/DragonHoverPhase.java) with Mojang official mappings, stored verbatim on the site.