1
1
package me .desht .modularrouters .item .module ;
2
2
3
+ import me .desht .modularrouters .api .matching .IItemMatcher ;
3
4
import me .desht .modularrouters .client .util .TintColor ;
4
5
import me .desht .modularrouters .config .ConfigHolder ;
5
6
import me .desht .modularrouters .container .ModuleMenu ;
6
7
import me .desht .modularrouters .core .ModDataComponents ;
7
8
import me .desht .modularrouters .core .ModItems ;
8
9
import me .desht .modularrouters .core .ModMenuTypes ;
9
10
import me .desht .modularrouters .item .smartfilter .SmartFilterItem ;
10
- import me .desht .modularrouters .logic .compiled .CompiledFluidModule1 ;
11
- import me .desht .modularrouters .logic .compiled .CompiledFluidModule1 .FluidModuleSettings ;
11
+ import me .desht .modularrouters .logic .compiled .CompiledFluidModule ;
12
+ import me .desht .modularrouters .logic .compiled .CompiledFluidModule .FluidModuleSettings ;
12
13
import me .desht .modularrouters .logic .filter .matchers .FluidMatcher ;
13
- import me .desht .modularrouters .api .matching .IItemMatcher ;
14
14
import net .minecraft .ChatFormatting ;
15
15
import net .minecraft .network .chat .Component ;
16
16
import net .minecraft .world .inventory .MenuType ;
@@ -27,7 +27,7 @@ public class FluidModule1 extends ModuleItem {
27
27
private static final TintColor TINT_COLOR = new TintColor (79 , 191 , 255 );
28
28
29
29
public FluidModule1 () {
30
- super (ModItems .defaultProps (), CompiledFluidModule1 ::new );
30
+ super (ModItems .defaultProps (), CompiledFluidModule ::new );
31
31
}
32
32
33
33
@ Override
@@ -50,7 +50,11 @@ protected Component getFilterItemDisplayName(ItemStack stack) {
50
50
protected void addExtraInformation (ItemStack stack , List <Component > list ) {
51
51
super .addExtraInformation (stack , list );
52
52
53
- addFluidModuleInformation (stack , list );
53
+ FluidModuleSettings settings = stack .getOrDefault (ModDataComponents .FLUID_SETTINGS .get (), FluidModuleSettings .DEFAULT );
54
+ list .add (xlate ("modularrouters.itemText.transfer_direction" ,
55
+ xlate (settings .direction ().getTranslationKey ()).withStyle (ChatFormatting .AQUA )).withStyle (ChatFormatting .YELLOW ));
56
+ list .add (xlate ("modularrouters.itemText.fluid.maxTransfer" ,
57
+ colorText (settings .maxTransfer (), ChatFormatting .AQUA )).withStyle (ChatFormatting .YELLOW ));
54
58
}
55
59
56
60
@ Override
@@ -81,14 +85,4 @@ public boolean isFluidModule() {
81
85
public TintColor getItemTint () {
82
86
return TINT_COLOR ;
83
87
}
84
-
85
- static void addFluidModuleInformation (ItemStack stack , List <Component > list ) {
86
- // CompiledFluidModule1 cfm = new CompiledFluidModule1(null, stack);
87
- FluidModuleSettings settings = stack .getOrDefault (ModDataComponents .FLUID_SETTINGS .get (), FluidModuleSettings .DEFAULT );
88
- list .add (xlate ("modularrouters.itemText.transfer_direction" ,
89
- xlate (settings .direction ().getTranslationKey ()).withStyle (ChatFormatting .AQUA )).withStyle (ChatFormatting .YELLOW ));
90
- list .add (xlate ("modularrouters.itemText.fluid.maxTransfer" ,
91
- colorText (settings .maxTransfer (), ChatFormatting .AQUA )).withStyle (ChatFormatting .YELLOW ));
92
- }
93
-
94
88
}
0 commit comments