SlotProvider .java

net.minecraft.world.entity.SlotProvider (interface, 17 lines): members: getSlotsFromRange, getSlot. imports: SlotCollection, IntList, Nullable.

net.minecraft.world.entityinterface17 linescommon514 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (2)

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

Full Source

SlotProvider.java17 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.entity;
2
3
import it.unimi.dsi.fastutil.ints.IntList;
4
import java.util.List;
5
import java.util.Objects;
6
import net.minecraft.world.item.slot.SlotCollection;
7
import org.jspecify.annotations.Nullable;
8
9
public interface SlotProvider {
10
	@Nullable SlotAccess getSlot(int slot);
11
12
	default SlotCollection getSlotsFromRange(final IntList slots) {
13
		List<SlotAccess> slotList = slots.intStream().mapToObj(this::getSlot).filter(Objects::nonNull).toList();
14
		return SlotCollection.of(slotList);
15
	}
16
}
17

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