File tree 2 files changed +17
-4
lines changed
src/main/java/com/vulpeus/kyoyu
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,11 @@ public class KyoyuMod
40
40
//? if PAPER
41
41
/* false */
42
42
);
43
+
44
+ //? if FABRIC
43
45
KyoyuPacketPayload .register ();
46
+ //? if NEOFORGE
47
+ /* modBus.register(KyoyuPacketPayload.class); */
44
48
45
49
Kyoyu .loadConfig ();
46
50
}
Original file line number Diff line number Diff line change @@ -73,12 +73,21 @@ public void write(FriendlyByteBuf output) {
73
73
output .writeByteArray (content );
74
74
}
75
75
76
- public static void register () {
77
- //? if FABRIC && >=1.20.6 {
76
+ //? if FABRIC && >=1.20.6 {
77
+ public static void register () {
78
78
net .fabricmc .fabric .api .networking .v1 .PayloadTypeRegistry .playC2S ().register (TYPE , CODEC );
79
79
net .fabricmc .fabric .api .networking .v1 .PayloadTypeRegistry .playS2C ().register (TYPE , CODEC );
80
- //?}
81
- }
80
+ }
81
+ //?} elif NEOFORGE && >=1.20.6 {
82
+ /*
83
+ @net.neoforged.bus.api.SubscribeEvent
84
+ public static void register(net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent event) {
85
+ event.registrar("1").optional().playBidirectional(TYPE, CODEC, null);
86
+ }
87
+ */
88
+ //?} else {
89
+ public static void register (Object ...arg ) {}
90
+ //?}
82
91
83
92
public void sendC2S () {
84
93
//? !PAPER {
You can’t perform that action at this time.
0 commit comments