NormalCraftingRecipe .java

net.minecraft.world.item.crafting.NormalCraftingRecipe (class): members: placementInfo, showNotification, createPlacementInfo, bookInfo, commonInfo, group.

net.minecraft.world.item.craftingclass44 linescommon1.1 KB

Implements

API Surface (4)

String group()
CraftingBookCategory category()
boolean showNotification()
PlacementInfo placementInfo()

Fields & Constants (3)

commonInfo
bookInfo
placementInfo

Code Graph: Dependencies (5)

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

Full Source

NormalCraftingRecipe.java44 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item.crafting;
2
3
import org.jspecify.annotations.Nullable;
4
5
public abstract class NormalCraftingRecipe implements CraftingRecipe {
6
	protected final Recipe.CommonInfo commonInfo;
7
	protected final CraftingRecipe.CraftingBookInfo bookInfo;
8
	private @Nullable PlacementInfo placementInfo;
9
10
	protected NormalCraftingRecipe(final Recipe.CommonInfo commonInfo, final CraftingRecipe.CraftingBookInfo bookInfo) {
11
		this.commonInfo = commonInfo;
12
		this.bookInfo = bookInfo;
13
	}
14
15
	@Override
16
	public abstract RecipeSerializer<? extends NormalCraftingRecipe> getSerializer();
17
18
	@Override
19
	public final String group() {
20
		return this.bookInfo.group();
21
	}
22
23
	@Override
24
	public final CraftingBookCategory category() {
25
		return this.bookInfo.category();
26
	}
27
28
	@Override
29
	public final boolean showNotification() {
30
		return this.commonInfo.showNotification();
31
	}
32
33
	protected abstract PlacementInfo createPlacementInfo();
34
35
	@Override
36
	public final PlacementInfo placementInfo() {
37
		if (this.placementInfo == null) {
38
			this.placementInfo = this.createPlacementInfo();
39
		}
40
41
		return this.placementInfo;
42
	}
43
}
44

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