11package com .circulation .random_complement .mixin .ae2 ;
22
33import appeng .helpers .WirelessTerminalGuiObject ;
4+ import appeng .parts .automation .UpgradeInventory ;
5+ import appeng .tile .inventory .AppEngInternalInventory ;
46import com ._0xc4de .ae2exttable .client .gui .WirelessTerminalGuiObjectTwo ;
57import com .circulation .random_complement .client .RCSettings ;
68import com .circulation .random_complement .client .buttonsetting .PatternTermAutoFillPattern ;
1719import org .spongepowered .asm .mixin .Unique ;
1820import org .spongepowered .asm .mixin .injection .At ;
1921import org .spongepowered .asm .mixin .injection .Inject ;
22+ import org .spongepowered .asm .mixin .injection .Redirect ;
2023import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
2124
2225@ Mixin (value = WirelessTerminalGuiObject .class , remap = false )
@@ -67,10 +70,20 @@ public void loadFromNBT(CallbackInfo ci) {
6770 return false ;
6871 }
6972
73+ @ Redirect (method = "loadFromNBT" , at = @ At (value = "INVOKE" , target = "Lappeng/tile/inventory/AppEngInternalInventory;readFromNBT(Lnet/minecraft/nbt/NBTTagCompound;)V" ), allow = 1 )
74+ public void loadViewCell (AppEngInternalInventory instance , NBTTagCompound data ) {
75+ instance .readFromNBT (data , "viewCell" );
76+ }
77+
78+ @ Redirect (method = "loadFromNBT" , at = @ At (value = "INVOKE" , target = "Lappeng/parts/automation/UpgradeInventory;readFromNBT(Lnet/minecraft/nbt/NBTTagCompound;)V" ), allow = 1 )
79+ public void loadUpgrade (UpgradeInventory instance , NBTTagCompound data ) {
80+ instance .readFromNBT (data , "upgrades" );
81+ }
82+
7083 @ Inject (method = "loadFromNBT" , at = @ At ("TAIL" ))
7184 public void loadFromNBT (CallbackInfo ci , @ Local (name = "data" ) NBTTagCompound data ) {
7285 if (data != null ) {
7386 this .randomComplement$rcSettings .readFromNBT (data );
7487 }
7588 }
76- }
89+ }
0 commit comments