Skip to content

Commit

Permalink
Add SideOnly when using client only stuff (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis authored Dec 23, 2024
1 parent ccff739 commit 496369c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.cleanroommc.bogosorter.common.dropoff.render.RendererCube;
import com.cleanroommc.bogosorter.common.dropoff.render.RendererCubeTarget;
import com.gtnewhorizon.gtnhlib.blockpos.BlockPos;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.network.NetHandlerPlayClient;
Expand Down Expand Up @@ -70,6 +72,7 @@ public void decode(PacketBuffer buf) throws IOException {
}
}

@SideOnly(Side.CLIENT)
@Override
public IPacket executeClient(NetHandlerPlayClient handler) {
if (DropOffHandler.dropoffRender){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.cleanroommc.bogosorter.common.SortConfigChangeEvent;
import com.cleanroommc.bogosorter.common.config.PlayerConfig;
import com.cleanroommc.bogosorter.common.config.Serializer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.common.MinecraftForge;
Expand All @@ -19,6 +21,7 @@ public void encode(PacketBuffer buf) throws IOException {
public void decode(PacketBuffer buf) throws IOException {
}

@SideOnly(Side.CLIENT)
@Override
public IPacket executeClient(NetHandlerPlayClient handler) {
Serializer.loadConfig();
Expand Down

0 comments on commit 496369c

Please sign in to comment.