4
4
import gregtech .api .recipes .RecipeMap ;
5
5
import net .minecraft .util .ResourceLocation ;
6
6
import net .minecraftforge .fluids .FluidTank ;
7
- import net .minecraftforge .items .ItemStackHandler ;
8
7
9
8
import java .util .ArrayList ;
10
9
import java .util .List ;
@@ -21,19 +20,19 @@ public RecipeMapPrimitiveMultiblockController(ResourceLocation metaTileEntityId,
21
20
22
21
// just initialize inventories based on RecipeMap values by default
23
22
protected void initializeAbilities () {
24
- this .importItems = new ItemStackHandler (recipeMapWorkable .recipeMap .getMaxInputs ());
25
- this .importFluids = new FluidTankList (true , makeFluidTanks (recipeMapWorkable .recipeMap .getMaxFluidInputs ()));
26
- this .exportItems = new ItemStackHandler (recipeMapWorkable .recipeMap .getMaxOutputs ());
27
- this .exportFluids = new FluidTankList (false , makeFluidTanks (recipeMapWorkable .recipeMap .getMaxFluidOutputs ()));
23
+ this .importItems = new NotifiableItemStackHandler (recipeMapWorkable .recipeMap .getMaxInputs (), this , false );
24
+ this .importFluids = new FluidTankList (true , makeFluidTanks (recipeMapWorkable .recipeMap .getMaxFluidInputs (), false ));
25
+ this .exportItems = new NotifiableItemStackHandler (recipeMapWorkable .recipeMap .getMaxOutputs (), this , true );
26
+ this .exportFluids = new FluidTankList (false , makeFluidTanks (recipeMapWorkable .recipeMap .getMaxFluidOutputs (), true ));
28
27
29
28
this .itemInventory = new ItemHandlerProxy (this .importItems , this .exportItems );
30
29
this .fluidInventory = new FluidHandlerProxy (this .importFluids , this .exportFluids );
31
30
}
32
31
33
- private List <FluidTank > makeFluidTanks (int length ) {
32
+ private List <FluidTank > makeFluidTanks (int length , boolean isExport ) {
34
33
List <FluidTank > fluidTankList = new ArrayList <>(length );
35
34
for (int i = 0 ; i < length ; i ++) {
36
- fluidTankList .add (new FluidTank (32000 ));
35
+ fluidTankList .add (new NotifiableFluidTank (32000 , this , isExport ));
37
36
}
38
37
return fluidTankList ;
39
38
}
0 commit comments