Skip to content

Commit

Permalink
add missing ClientOnly markers (fixes #28)
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Sep 9, 2024
1 parent 274532a commit 06c8434
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.network.PacketByteBuf;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import org.quiltmc.loader.api.minecraft.ClientOnly;
import org.quiltmc.qsl.networking.api.PacketByteBufs;
import org.quiltmc.qsl.networking.api.PacketSender;
import org.quiltmc.qsl.networking.api.ServerPlayNetworking;
Expand All @@ -23,6 +24,7 @@ public static void send(ServerPlayerEntity player) {
ServerPlayNetworking.send(player, ID, buf);
}

@ClientOnly
public static void handle(MinecraftClient client, ClientPlayNetworkHandler handler, PacketByteBuf buf, PacketSender sender) {
boolean castingSpeedHasCoolDown = buf.readBoolean();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import org.quiltmc.loader.api.QuiltLoader;
import org.quiltmc.loader.api.minecraft.ClientOnly;
import org.quiltmc.qsl.networking.api.PacketByteBufs;
import org.quiltmc.qsl.networking.api.PacketSender;
import org.quiltmc.qsl.networking.api.ServerPlayNetworking;
Expand All @@ -29,6 +30,7 @@ public static void send(ServerPlayerEntity player, double x, double y, double z,
ServerPlayNetworking.send(player, ID, buf);
}

@ClientOnly
public static void handle(MinecraftClient client, ClientPlayNetworkHandler handler, PacketByteBuf buf, PacketSender sender) {
double x = buf.readDouble();
double y = buf.readDouble();
Expand Down

0 comments on commit 06c8434

Please sign in to comment.