BoundingBoxRenderable .java

net.minecraft.world.level.block.entity.BoundingBoxRenderable (interface): members: RenderableBox, getRenderableBox, renderMode, Mode. imports: Vec3i.

net.minecraft.world.level.block.entityinterface26 linescommon773 B

API Surface (1)

BoundingBoxRenderable.RenderableBox fromCorners(final int x1, final int y1, final int z1, final int x2, final int y2, final int z2)

Code Graph: Dependencies (2)

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

Full Source

BoundingBoxRenderable.java26 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block.entity;
2
3
import net.minecraft.core.BlockPos;
4
import net.minecraft.core.Vec3i;
5
6
public interface BoundingBoxRenderable {
7
	BoundingBoxRenderable.Mode renderMode();
8
9
	BoundingBoxRenderable.RenderableBox getRenderableBox();
10
11
	enum Mode {
12
		NONE,
13
		BOX,
14
		BOX_AND_INVISIBLE_BLOCKS;
15
	}
16
17
	record RenderableBox(BlockPos localPos, Vec3i size) {
18
		public static BoundingBoxRenderable.RenderableBox fromCorners(final int x1, final int y1, final int z1, final int x2, final int y2, final int z2) {
19
			int x = Math.min(x1, x2);
20
			int y = Math.min(y1, y2);
21
			int z = Math.min(z1, z2);
22
			return new BoundingBoxRenderable.RenderableBox(new BlockPos(x, y, z), new Vec3i(Math.max(x1, x2) - x, Math.max(y1, y2) - y, Math.max(z1, z2) - z));
23
		}
24
	}
25
}
26

Decompiled Minecraft 26.3 source of BoundingBoxRenderable (net/minecraft/world/level/block/entity/BoundingBoxRenderable.java) with Mojang official mappings, stored verbatim on the site.