1
1
package juuxel .adorn .platform .forge ;
2
2
3
3
import juuxel .adorn .AdornCommon ;
4
+ import juuxel .adorn .block .AdornBlockEntities ;
5
+ import juuxel .adorn .block .AdornBlocks ;
4
6
import juuxel .adorn .block .variant .BlockVariantSets ;
5
7
import juuxel .adorn .config .ConfigManager ;
6
8
import juuxel .adorn .criterion .AdornCriteria ;
9
+ import juuxel .adorn .entity .AdornEntities ;
10
+ import juuxel .adorn .item .AdornItems ;
7
11
import juuxel .adorn .item .group .AdornItemGroups ;
12
+ import juuxel .adorn .lib .AdornGameRules ;
13
+ import juuxel .adorn .lib .AdornSounds ;
8
14
import juuxel .adorn .lib .AdornStats ;
15
+ import juuxel .adorn .lib .AdornTags ;
9
16
import juuxel .adorn .lib .registry .Registrar ;
10
17
import juuxel .adorn .loot .AdornLootConditionTypes ;
11
18
import juuxel .adorn .loot .AdornLootFunctionTypes ;
12
19
import juuxel .adorn .menu .AdornMenus ;
13
20
import juuxel .adorn .platform .forge .client .AdornClient ;
14
21
import juuxel .adorn .platform .forge .compat .Compat ;
22
+ import juuxel .adorn .platform .forge .event .BlockEvents ;
23
+ import juuxel .adorn .platform .forge .event .EntityEvents ;
15
24
import juuxel .adorn .platform .forge .event .ItemEvents ;
16
25
import juuxel .adorn .platform .forge .networking .AdornNetworking ;
17
26
import juuxel .adorn .platform .forge .registrar .ForgeRegistrar ;
@@ -30,19 +39,26 @@ public Adorn() {
30
39
var modBus = ModLoadingContext .get ().getActiveContainer ().getEventBus ();
31
40
ConfigManager .get ().init ();
32
41
modBus .addListener (this ::init );
33
- new EventsImplementedInJava ().register (modBus );
42
+ register (AdornSounds .SOUNDS , modBus );
43
+ register (AdornBlocks .BLOCKS , modBus );
44
+ register (AdornBlocks .ITEMS , modBus );
45
+ register (AdornItems .ITEMS , modBus );
46
+ register (AdornEntities .ENTITIES , modBus );
47
+ register (AdornBlockEntities .BLOCK_ENTITIES , modBus );
34
48
AdornItemGroups .init ();
35
- registerToBus (AdornItemGroups .ITEM_GROUPS , modBus );
49
+ register (AdornItemGroups .ITEM_GROUPS , modBus );
36
50
AdornRecipes .init ();
37
- registerToBus (AdornMenus .MENUS , modBus );
38
- registerToBus (AdornRecipes .RECIPE_SERIALIZERS , modBus );
39
- registerToBus (AdornRecipes .RECIPE_TYPES , modBus );
40
- registerToBus (AdornLootConditionTypes .LOOT_CONDITION_TYPES , modBus );
41
- registerToBus (AdornLootFunctionTypes .LOOT_FUNCTION_TYPES , modBus );
51
+ register (AdornMenus .MENUS , modBus );
52
+ register (AdornRecipes .RECIPE_SERIALIZERS , modBus );
53
+ register (AdornRecipes .RECIPE_TYPES , modBus );
54
+ register (AdornLootConditionTypes .LOOT_CONDITION_TYPES , modBus );
55
+ register (AdornLootFunctionTypes .LOOT_FUNCTION_TYPES , modBus );
42
56
modBus .addListener (AdornNetworking ::register );
43
57
AdornCriteria .init ();
44
- registerToBus (AdornCriteria .CRITERIA , modBus );
58
+ register (AdornCriteria .CRITERIA , modBus );
45
59
ItemEvents .register (modBus );
60
+ BlockEvents .init ();
61
+ EntityEvents .init ();
46
62
modBus .addListener (AdornCapabilities ::register );
47
63
Compat .init (modBus );
48
64
BlockVariantSets .register ();
@@ -53,11 +69,13 @@ public Adorn() {
53
69
}
54
70
}
55
71
56
- private void registerToBus (Registrar <?> registrar , IEventBus modBus ) {
72
+ private void register (Registrar <?> registrar , IEventBus modBus ) {
57
73
((ForgeRegistrar <?>) registrar ).hook (modBus );
58
74
}
59
75
60
76
private void init (FMLCommonSetupEvent event ) {
77
+ AdornGameRules .init ();
78
+ AdornTags .init ();
61
79
AdornStats .init ();
62
80
ConfigManager .get ().finish ();
63
81
}
0 commit comments