SlotRange .java

net.minecraft.world.inventory.SlotRange (interface, 32 lines): extends StringRepresentable. members: slots, size. imports: IntList, StringRepresentable.

net.minecraft.world.inventoryinterface32 linescommonextends StringRepresentable568 B

API Surface (3)

IntList slots()
String getSerializedName()
String toString()

Code Graph: Dependencies (1)

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

Full Source

SlotRange.java32 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.inventory;
2
3
import it.unimi.dsi.fastutil.ints.IntList;
4
import net.minecraft.util.StringRepresentable;
5
6
public interface SlotRange extends StringRepresentable {
7
	IntList slots();
8
9
	default int size() {
10
		return this.slots().size();
11
	}
12
13
	static SlotRange of(final String name, final IntList slots) {
14
		return new SlotRange() {
15
			@Override
16
			public IntList slots() {
17
				return slots;
18
			}
19
20
			@Override
21
			public String getSerializedName() {
22
				return name;
23
			}
24
25
			@Override
26
			public String toString() {
27
				return name;
28
			}
29
		};
30
	}
31
}
32

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