EntityHitResult .java

net.minecraft.world.phys.EntityHitResult (class, 26 lines): extends HitResult. members: getEntity, entity, getType. imports: Entity.

net.minecraft.world.physclass26 linescommonextends HitResult497 B

API Surface (2)

Entity getEntity()
HitResult.Type getType()

Fields & Constants (1)

entity

Code Graph: Dependencies (3)

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

Full Source

EntityHitResult.java26 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.phys;
2
3
import net.minecraft.world.entity.Entity;
4
5
public class EntityHitResult extends HitResult {
6
	private final Entity entity;
7
8
	public EntityHitResult(final Entity entity) {
9
		this(entity, entity.position());
10
	}
11
12
	public EntityHitResult(final Entity entity, final Vec3 location) {
13
		super(location);
14
		this.entity = entity;
15
	}
16
17
	public Entity getEntity() {
18
		return this.entity;
19
	}
20
21
	@Override
22
	public HitResult.Type getType() {
23
		return HitResult.Type.ENTITY;
24
	}
25
}
26

Decompiled Minecraft 26.3 source of EntityHitResult (net/minecraft/world/phys/EntityHitResult.java) with Mojang official mappings, stored verbatim on the site.