CrafterSlot .java

net.minecraft.world.inventory.CrafterSlot (class, 25 lines): extends Slot. members: menu, mayPlace, setChanged. imports: Container, ItemStack.

net.minecraft.world.inventoryclass25 linescommonextends Slot621 B

API Surface (2)

boolean mayPlace(final ItemStack itemStack)
void setChanged()

Fields & Constants (1)

menu

Code Graph: Dependencies (4)

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

Full Source

CrafterSlot.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.inventory;
2
3
import net.minecraft.world.Container;
4
import net.minecraft.world.item.ItemStack;
5
6
public class CrafterSlot extends Slot {
7
	private final CrafterMenu menu;
8
9
	public CrafterSlot(final Container container, final int slot, final int x, final int y, final CrafterMenu menu) {
10
		super(container, slot, x, y);
11
		this.menu = menu;
12
	}
13
14
	@Override
15
	public boolean mayPlace(final ItemStack itemStack) {
16
		return !this.menu.isSlotDisabled(this.index) && super.mayPlace(itemStack);
17
	}
18
19
	@Override
20
	public void setChanged() {
21
		super.setChanged();
22
		this.menu.slotsChanged(this.container);
23
	}
24
}
25

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