SimpleSmithingRecipe .java

net.minecraft.world.item.crafting.SimpleSmithingRecipe (class, 37 lines): members: placementInfo, showNotification, createPlacementInfo, commonInfo, group.

net.minecraft.world.item.craftingclass37 linescommon847 B

Implements

API Surface (3)

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

Fields & Constants (2)

commonInfo
placementInfo

Code Graph: Dependencies (4)

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

Full Source

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

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