ItemAccessor .java

net.minecraft.server.commands.item.ItemAccessor (interface, 25 lines): members: SetterFunction, getReplaceSuccess, getModifySuccess, getSlots, setItems.

net.minecraft.server.commands.iteminterface25 linesserver1.1 KB

API Surface (0)

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

Code Graph: Dependencies (5)

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

Full Source

ItemAccessor.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.server.commands.item;
2
3
import com.mojang.brigadier.exceptions.CommandSyntaxException;
4
import net.minecraft.commands.CommandSourceStack;
5
import net.minecraft.server.commands.CommandResponseTracker;
6
import net.minecraft.world.item.ItemStack;
7
import net.minecraft.world.item.slot.SlotCollection;
8
import net.minecraft.world.item.slot.SlotSource;
9
import org.jspecify.annotations.Nullable;
10
11
public interface ItemAccessor<Target> {
12
	void setItems(CommandSourceStack source, SlotSource slotSource, ItemAccessor.SetterFunction<Target> function) throws CommandSyntaxException;
13
14
	SlotCollection getSlots(CommandSourceStack source, SlotSource slotSource) throws CommandSyntaxException;
15
16
	int getReplaceSuccess(CommandSourceStack source, CommandResponseTracker<Target> tracker, @Nullable ItemStack knownItem) throws CommandSyntaxException;
17
18
	int getModifySuccess(CommandSourceStack source, CommandResponseTracker<Target> tracker) throws CommandSyntaxException;
19
20
	@FunctionalInterface
21
	interface SetterFunction<Target> {
22
		int apply(Target target, SlotCollection slots);
23
	}
24
}
25

Decompiled Minecraft 26.3 source of ItemAccessor (net/minecraft/server/commands/item/ItemAccessor.java) with Mojang official mappings, stored verbatim on the site.