-
Notifications
You must be signed in to change notification settings - Fork 755
/
ToolRebuildContext.java
34 lines (32 loc) · 1.33 KB
/
ToolRebuildContext.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package slimeknights.tconstruct.library.tools.context;
import lombok.Data;
import lombok.With;
import net.minecraft.world.item.Item;
import slimeknights.tconstruct.library.tools.definition.ToolDefinition;
import slimeknights.tconstruct.library.tools.nbt.IModDataView;
import slimeknights.tconstruct.library.tools.nbt.IToolContext;
import slimeknights.tconstruct.library.tools.nbt.IToolStackView;
import slimeknights.tconstruct.library.tools.nbt.MaterialNBT;
import slimeknights.tconstruct.library.tools.nbt.ModifierNBT;
/**
* Implementation of the limited view of {@link IToolStackView} for use in tool rebuild hooks
*/
@SuppressWarnings("ClassCanBeRecord")
@Data
public class ToolRebuildContext implements IToolContext {
/** Item being rebuilt */
private final Item item;
/** Tool definition of the item being rebuilt */
private final ToolDefinition definition;
/** Materials on the tool being rebuilt */
private final MaterialNBT materials;
/** List of recipe modifiers on the tool being rebuilt */
private final ModifierNBT upgrades;
/** List of all modifiers on the tool being rebuilt, from recipes and traits */
@With
private final ModifierNBT modifiers;
/** Persistent modifier data, intentionally read only */
private final IModDataView persistentData;
/** Volatile modifier data */
private final IModDataView volatileData;
}