File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/net/darkhax/bookshelf/registry Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,15 @@ public void initialize (IEventBus bus) {
52
52
}
53
53
}
54
54
55
+ /**
56
+ * @deprecated The static instantiation of commands seems to make some mixin mods very
57
+ * unhappy. As a result this approach to registering commands has been
58
+ * deprecated and will be removed in future updates.
59
+ */
60
+ @ Deprecated
55
61
public LiteralArgumentBuilder <CommandSource > registerCommand (LiteralArgumentBuilder <CommandSource > command ) {
56
62
63
+ this .logger .error ("Registered a command using a deprecated method. This will cause errors! {]" , command );
57
64
this .commands .add (command );
58
65
return command ;
59
66
}
@@ -62,7 +69,7 @@ private void registerCommands (RegisterCommandsEvent event) {
62
69
63
70
if (!this .commands .isEmpty ()) {
64
71
65
- this .logger .info ("Registering {} commands." , this .commands .size ());
72
+ this .logger .info ("Registering {} commands. This mod is using a deprecated system! " , this .commands .size ());
66
73
final CommandDispatcher <CommandSource > dispatcher = event .getDispatcher ();
67
74
68
75
for (final LiteralArgumentBuilder <CommandSource > command : this .commands ) {
You can’t perform that action at this time.
0 commit comments