File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
src/main/java/me/clickism/clicksigns/network Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -75,17 +75,19 @@ public void receive(
7575 /*ServerWorld world = player.getServerWorld();
7676 RoadSignPacket packet = fromPacketByteBuf(buf);
7777 */ //?}
78- if (world .getBlockEntity (packet .pos ()) instanceof RoadSignBlockEntity entity ) {
79- if (packet .identifier ().equals (ClickSigns .ERROR_TEMPLATE_ID )) return ;
80- entity .setRoadSign (packet .toRoadSign ());
81- PlayerLookup .world (world ).forEach (p ->
82- //? if >=1.20.5 {
83- ServerPlayNetworking .send (p , packet )
84- //?} else {
85- /*ServerPlayNetworking.send(p, PACKET_ID, packet.toPacketByteBuf())
86- */ //?}
87- );
88- }
78+ world .getServer ().execute (() -> {
79+ if (world .getBlockEntity (packet .pos ()) instanceof RoadSignBlockEntity entity ) {
80+ if (packet .identifier ().equals (ClickSigns .ERROR_TEMPLATE_ID )) return ;
81+ entity .setRoadSign (packet .toRoadSign ());
82+ PlayerLookup .world (world ).forEach (p ->
83+ //? if >=1.20.5 {
84+ ServerPlayNetworking .send (p , packet )
85+ //?} else {
86+ /*ServerPlayNetworking.send(p, PACKET_ID, packet.toPacketByteBuf())
87+ */ //?}
88+ );
89+ }
90+ });
8991 }
9092 }
9193
You can’t perform that action at this time.
0 commit comments