@@ -11,23 +11,44 @@ function initializeCoreMod() {
11
11
'transformer' : function ( node ) {
12
12
var method = node . visitMethod ( Opcodes . ACC_PUBLIC , "<init>" , "(Lnet/minecraft/world/item/CreativeModeTab$Row;ILnet/minecraft/world/item/CreativeModeTab$Type;Lnet/minecraft/network/chat/Component;Ljava/util/function/Supplier;Lnet/minecraft/world/item/CreativeModeTab$DisplayItemsGenerator;)V" , null , null ) ;
13
13
method . visitCode ( ) ;
14
+
14
15
method . visitVarInsn ( Opcodes . ALOAD , 0 ) ;
16
+ // row
15
17
method . visitVarInsn ( Opcodes . ALOAD , 1 ) ;
18
+ // column
16
19
method . visitVarInsn ( Opcodes . ILOAD , 2 ) ;
20
+ // type
17
21
method . visitVarInsn ( Opcodes . ALOAD , 3 ) ;
22
+ // displayName
18
23
method . visitVarInsn ( Opcodes . ALOAD , 4 ) ;
24
+ // iconGenerator
19
25
method . visitVarInsn ( Opcodes . ALOAD , 5 ) ;
26
+ // displayItemsGenerator
20
27
method . visitVarInsn ( Opcodes . ALOAD , 6 ) ;
21
- method . visitTypeInsn ( Opcodes . NEW , "net/minecraft/resources/ResourceLocation" ) ; // backgroundLocation
28
+ // backgroundLocation
29
+ method . visitTypeInsn ( Opcodes . NEW , "net/minecraft/resources/ResourceLocation" ) ;
22
30
method . visitInsn ( Opcodes . DUP ) ;
23
31
method . visitLdcInsn ( "textures/gui/container/creative_inventory/tab_items.png" ) ;
24
32
method . visitMethodInsn ( Opcodes . INVOKESPECIAL , "net/minecraft/resources/ResourceLocation" , "<init>" , "(Ljava/lang/String;)V" ) ;
25
- method . visitInsn ( Opcodes . ICONST_0 ) ; // hasSearchBar
26
- method . visitLdcInsn ( 89 ) ; // searchBarWidth
33
+ // hasSearchBar
34
+ method . visitInsn ( Opcodes . ICONST_0 ) ;
35
+ // searchBarWidth
36
+ method . visitLdcInsn ( 89 ) ;
27
37
method . visitFieldInsn ( Opcodes . GETSTATIC , "net/minecraft/world/item/CreativeModeTab$Builder" , "CREATIVE_INVENTORY_TABS_IMAGE" , "Lnet/minecraft/resources/ResourceLocation;" ) ; // tabsImage
28
- method . visitLdcInsn ( 4210752 ) ; // labelColor
29
- method . visitLdcInsn ( - 2130706433 ) ; // slotColor
30
- method . visitMethodInsn ( Opcodes . INVOKESPECIAL , "net/minecraft/world/item/CreativeModeTab" , "<init>" , "(Lnet/minecraft/world/item/CreativeModeTab$Row;ILnet/minecraft/world/item/CreativeModeTab$Type;Lnet/minecraft/network/chat/Component;Ljava/util/function/Supplier;Lnet/minecraft/world/item/CreativeModeTab$DisplayItemsGenerator;Lnet/minecraft/resources/ResourceLocation;ZILnet/minecraft/resources/ResourceLocation;II)V" , false ) ;
38
+ // labelColor
39
+ method . visitLdcInsn ( 4210752 ) ;
40
+ // slotColor
41
+ method . visitLdcInsn ( - 2130706433 ) ;
42
+ // tabsBefore
43
+ method . visitTypeInsn ( Opcodes . NEW , "java/util/ArrayList" )
44
+ method . visitInsn ( Opcodes . DUP )
45
+ method . visitMethodInsn ( Opcodes . INVOKESPECIAL , "java/util/ArrayList" , "<init>" , "()V" )
46
+ // tabsAfter
47
+ method . visitTypeInsn ( Opcodes . NEW , "java/util/ArrayList" )
48
+ method . visitInsn ( Opcodes . DUP )
49
+ method . visitMethodInsn ( Opcodes . INVOKESPECIAL , "java/util/ArrayList" , "<init>" , "()V" )
50
+ // invoke ctr
51
+ method . visitMethodInsn ( Opcodes . INVOKESPECIAL , "net/minecraft/world/item/CreativeModeTab" , "<init>" , "(Lnet/minecraft/world/item/CreativeModeTab$Row;ILnet/minecraft/world/item/CreativeModeTab$Type;Lnet/minecraft/network/chat/Component;Ljava/util/function/Supplier;Lnet/minecraft/world/item/CreativeModeTab$DisplayItemsGenerator;Lnet/minecraft/resources/ResourceLocation;ZILnet/minecraft/resources/ResourceLocation;IILjava/util/List;Ljava/util/List;)V" , false ) ;
31
52
method . visitInsn ( Opcodes . RETURN ) ;
32
53
method . visitEnd ( ) ;
33
54
0 commit comments