Skip to content

Commit

Permalink
fix: ensure server-side
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Jan 5, 2025
1 parent 8d7c0a2 commit 843f044
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public boolean shouldGlow(Slider slider) {
}

public static void sendSignal(Slider slider) {
PacketDistributor.sendToPlayersNear(
if (!slider.level().isClientSide()) PacketDistributor.sendToPlayersNear(
(ServerLevel) slider.level(), null,
slider.getX(), slider.getY(), slider.getZ(), 50D,
new SliderSignalPacket.Signal(
Expand All @@ -53,7 +53,7 @@ public static void sendSignal(Slider slider) {
}

public static void syncDirection(Slider slider, Direction direction) {
PacketDistributor.sendToPlayersNear(
if (!slider.level().isClientSide()) PacketDistributor.sendToPlayersNear(
(ServerLevel) slider.level(), null,
slider.getX(), slider.getY(), slider.getZ(), 50D,
new SliderSignalPacket.DirectionOverride(
Expand All @@ -62,7 +62,7 @@ public static void syncDirection(Slider slider, Direction direction) {
}

public static void syncTarget(Slider slider, Entity target) {
PacketDistributor.sendToPlayersNear(
if (!slider.level().isClientSide()) PacketDistributor.sendToPlayersNear(
(ServerLevel) slider.level(), null,
slider.getX(), slider.getY(), slider.getZ(), 50D,
new SliderSignalPacket.SyncTarget(
Expand Down

0 comments on commit 843f044

Please sign in to comment.