26
26
import dev .galacticraft .machinelib .api .storage .StorageSpec ;
27
27
import dev .galacticraft .machinelib .api .storage .slot .ItemResourceSlot ;
28
28
import net .minecraft .core .BlockPos ;
29
- import net .minecraft .world .Container ;
30
29
import net .minecraft .world .item .Item ;
31
30
import net .minecraft .world .item .ItemStack ;
32
31
import net .minecraft .world .item .crafting .Recipe ;
33
32
import net .minecraft .world .item .crafting .RecipeHolder ;
33
+ import net .minecraft .world .item .crafting .RecipeInput ;
34
34
import net .minecraft .world .item .crafting .RecipeType ;
35
35
import net .minecraft .world .level .block .entity .BlockEntityType ;
36
36
import net .minecraft .world .level .block .state .BlockState ;
40
40
/**
41
41
* A machine block entity that processes recipes.
42
42
*
43
- * @param <C > The type of inventory the recipe type uses.
43
+ * @param <I > The type of inventory the recipe type uses.
44
44
* @param <R> The type of recipe the machine uses.
45
45
*/
46
- public abstract class BasicRecipeMachineBlockEntity <C extends Container , R extends Recipe <C >> extends RecipeMachineBlockEntity <C , R > {
46
+ public abstract class BasicRecipeMachineBlockEntity <I extends RecipeInput , R extends Recipe <I >> extends RecipeMachineBlockEntity <I , R > {
47
47
/**
48
48
* An inventory for use in finding vanilla recipes for this machine.
49
49
*/
50
- protected final @ NotNull C craftingInv ;
50
+ protected final @ NotNull I craftingInv ;
51
51
52
52
protected final SlottedStorageAccess <Item , ItemResourceSlot > inputSlots ;
53
53
protected final SlottedStorageAccess <Item , ItemResourceSlot > outputSlots ;
@@ -62,7 +62,7 @@ public abstract class BasicRecipeMachineBlockEntity<C extends Container, R exten
62
62
* @param inputSlot The index of the recipe input slot.
63
63
* @param outputSlot The index of the recipe output slot.
64
64
*/
65
- protected BasicRecipeMachineBlockEntity (BlockEntityType <? extends BasicRecipeMachineBlockEntity <C , R >> type ,
65
+ protected BasicRecipeMachineBlockEntity (BlockEntityType <? extends BasicRecipeMachineBlockEntity <I , R >> type ,
66
66
BlockPos pos , BlockState state , RecipeType <R > recipeType , StorageSpec spec , int inputSlot , int outputSlot ) {
67
67
this (type , pos , state , recipeType , spec , inputSlot , 1 , outputSlot );
68
68
}
@@ -78,7 +78,7 @@ protected BasicRecipeMachineBlockEntity(BlockEntityType<? extends BasicRecipeMac
78
78
* @param inputSlotsLen The number of recipe input slots.
79
79
* @param outputSlot The index of the recipe output slot.
80
80
*/
81
- protected BasicRecipeMachineBlockEntity (BlockEntityType <? extends BasicRecipeMachineBlockEntity <C , R >> type ,
81
+ protected BasicRecipeMachineBlockEntity (BlockEntityType <? extends BasicRecipeMachineBlockEntity <I , R >> type ,
82
82
BlockPos pos , BlockState state , RecipeType <R > recipeType , StorageSpec spec , int inputSlots , int inputSlotsLen , int outputSlot ) {
83
83
this (type , pos , state , recipeType , spec , inputSlots , inputSlotsLen , outputSlot , 1 );
84
84
}
@@ -95,7 +95,7 @@ protected BasicRecipeMachineBlockEntity(BlockEntityType<? extends BasicRecipeMac
95
95
* @param outputSlots The index of the first recipe output slot.
96
96
* @param outputSlotsLen The number of recipe output slots.
97
97
*/
98
- protected BasicRecipeMachineBlockEntity (BlockEntityType <? extends BasicRecipeMachineBlockEntity <C , R >> type ,
98
+ protected BasicRecipeMachineBlockEntity (BlockEntityType <? extends BasicRecipeMachineBlockEntity <I , R >> type ,
99
99
BlockPos pos , BlockState state , RecipeType <R > recipeType , StorageSpec spec , int inputSlots , int inputSlotsLen , int outputSlots , int outputSlotsLen ) {
100
100
super (type , pos , state , recipeType , spec );
101
101
@@ -105,7 +105,7 @@ protected BasicRecipeMachineBlockEntity(BlockEntityType<? extends BasicRecipeMac
105
105
this .craftingInv = this .createCraftingInv ();
106
106
}
107
107
108
- protected abstract C createCraftingInv ();
108
+ protected abstract I createCraftingInv ();
109
109
110
110
/**
111
111
* Creates an inventory for use in finding vanilla recipes for this machine.
@@ -115,7 +115,7 @@ protected BasicRecipeMachineBlockEntity(BlockEntityType<? extends BasicRecipeMac
115
115
*/
116
116
@ Override
117
117
@ Contract (pure = true )
118
- protected @ NotNull C craftingInv () {
118
+ protected @ NotNull I craftingInv () {
119
119
return this .craftingInv ;
120
120
}
121
121
0 commit comments