// Path: src/main/java/com/m4thg33k/tombmanygraves/network/GraveRenderTogglePacket.java
// public class GraveRenderTogglePacket extends BaseThreadsafePacket {
// 
//     public GraveRenderTogglePacket()
//     {
// 
//     }
// 
//     @Override
//     public void handleClientSafe(NetHandlerPlayClient netHandler) {
//         TombManyGraves.proxy.toggleGraveRendering();
//     }
// 
//     @Override
//     public void handleServerSafe(NetHandlerPlayServer netHandler) {
//         LogHelper.error("Attempting to handle rendering packet on server!");
//     }
// 
//     @Override
//     public void fromBytes(ByteBuf buf) {
// 
//     }
// 
//     @Override
//     public void toBytes(ByteBuf buf) {
// 
//     }
// }
// 
// Path: src/main/java/com/m4thg33k/tombmanygraves/network/TMGNetwork.java
// public class TMGNetwork {
// 
//     public static TMGNetwork instance = new TMGNetwork();
// 
//     public final SimpleNetworkWrapper network;
//     protected final BasePacketHandler handler;
//     private int id = 0;
// 
//     public TMGNetwork(){
//         network = NetworkRegistry.INSTANCE.newSimpleChannel(Names.MODID);
//         handler = new BasePacketHandler();
//     }
// 
//     public void registerPacket(Class<? extends BasePacket> packetClass)
//     {
//         registerPacketClient(packetClass);
//         registerPacketServer(packetClass);
//     }
// 
//     public static void registerPacketClient(Class<? extends BasePacket> packetClass)
//     {
//         registerPacketImp(packetClass, Side.CLIENT);
//     }
// 
//     public static void registerPacketServer(Class<? extends BasePacket> packetClass)
//     {
//         registerPacketImp(packetClass, Side.SERVER);
//     }
// 
//     public static void registerPacketImp(Class<? extends BasePacket> packetClass, Side side)
//     {
//         instance.network.registerMessage(instance.handler, packetClass, instance.id++, side);
//     }
// 
//     public static void setup()
//     {
//         //register packets here
//         registerPacketServer(PacketProbeFiles.class);
//         registerPacketClient(GraveRenderTogglePacket.class);
//         registerPacketClient(GravePosTogglePacket.class);
//     }
// 
//     public static void sendToAll(BasePacket packet)
//     {
//         instance.network.sendToAll(packet);
//     }
// 
//     public static void sendTo(BasePacket packet, EntityPlayerMP player)
//     {
//         instance.network.sendTo(packet, player);
//     }
// 
//     public static void sendToAllAround(BasePacket packet, NetworkRegistry.TargetPoint point)
//     {
//         instance.network.sendToAllAround(packet, point);
//     }
// 
//     public static void sendToDimension(BasePacket packet, int dimensionID)
//     {
//         instance.network.sendToDimension(packet, dimensionID);
//     }
// 
//     public static void sendToServer(BasePacket packet)
//     {
//         instance.network.sendToServer(packet);
//     }
// 
//     public static void sendToClients(WorldServer world, BlockPos pos, BasePacket packet)
//     {
//         Chunk chunk = world.getChunkFromBlockCoords(pos);
//         for (EntityPlayer player : world.playerEntities)
//         {
//             if (!(player instanceof EntityPlayerMP))
//             {
//                 continue;
//             }
//             EntityPlayerMP playerMP = (EntityPlayerMP) player;
//             if (world.getPlayerChunkMap().isPlayerWatchingChunk(playerMP, chunk.x, chunk.z))
//             {
// //                LogHelper.info("Sending packet to: " + player.getName());
//                 TMGNetwork.sendTo(packet, playerMP);
//             }
//         }
//     }
// }


import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import com.m4thg33k.tombmanygraves.network.GraveRenderTogglePacket;
import com.m4thg33k.tombmanygraves.network.TMGNetwork;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;
package com.m4thg33k.tombmanygraves.commands;





public class CommandToggleRender extends CommandBase {

    public CommandToggleRender()
    {
        super("tmg_toggle_render", 0, true);
    }

    @Override
    @Nonnull
    @ParametersAreNonnullByDefault
    public String getUsage(ICommandSender sender) {
        return COMMAND_NAME;
    }

    @Override
    @ParametersAreNonnullByDefault
    public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
        if (!(sender instanceof EntityPlayerMP))
        {
            return;
        }
// Path: src/main/java/com/m4thg33k/tombmanygraves/network/GraveRenderTogglePacket.java
// public class GraveRenderTogglePacket extends BaseThreadsafePacket {
// 
//     public GraveRenderTogglePacket()
//     {
// 
//     }
// 
//     @Override
//     public void handleClientSafe(NetHandlerPlayClient netHandler) {
//         TombManyGraves.proxy.toggleGraveRendering();
//     }
// 
//     @Override
//     public void handleServerSafe(NetHandlerPlayServer netHandler) {
//         LogHelper.error("Attempting to handle rendering packet on server!");
//     }
// 
//     @Override
//     public void fromBytes(ByteBuf buf) {
// 
//     }
// 
//     @Override
//     public void toBytes(ByteBuf buf) {
// 
//     }
// }
// 
// Path: src/main/java/com/m4thg33k/tombmanygraves/network/TMGNetwork.java
// public class TMGNetwork {
// 
//     public static TMGNetwork instance = new TMGNetwork();
// 
//     public final SimpleNetworkWrapper network;
//     protected final BasePacketHandler handler;
//     private int id = 0;
// 
//     public TMGNetwork(){
//         network = NetworkRegistry.INSTANCE.newSimpleChannel(Names.MODID);
//         handler = new BasePacketHandler();
//     }
// 
//     public void registerPacket(Class<? extends BasePacket> packetClass)
//     {
//         registerPacketClient(packetClass);
//         registerPacketServer(packetClass);
//     }
// 
//     public static void registerPacketClient(Class<? extends BasePacket> packetClass)
//     {
//         registerPacketImp(packetClass, Side.CLIENT);
//     }
// 
//     public static void registerPacketServer(Class<? extends BasePacket> packetClass)
//     {
//         registerPacketImp(packetClass, Side.SERVER);
//     }
// 
//     public static void registerPacketImp(Class<? extends BasePacket> packetClass, Side side)
//     {
//         instance.network.registerMessage(instance.handler, packetClass, instance.id++, side);
//     }
// 
//     public static void setup()
//     {
//         //register packets here
//         registerPacketServer(PacketProbeFiles.class);
//         registerPacketClient(GraveRenderTogglePacket.class);
//         registerPacketClient(GravePosTogglePacket.class);
//     }
// 
//     public static void sendToAll(BasePacket packet)
//     {
//         instance.network.sendToAll(packet);
//     }
// 
//     public static void sendTo(BasePacket packet, EntityPlayerMP player)
//     {
//         instance.network.sendTo(packet, player);
//     }
// 
//     public static void sendToAllAround(BasePacket packet, NetworkRegistry.TargetPoint point)
//     {
//         instance.network.sendToAllAround(packet, point);
//     }
// 
//     public static void sendToDimension(BasePacket packet, int dimensionID)
//     {
//         instance.network.sendToDimension(packet, dimensionID);
//     }
// 
//     public static void sendToServer(BasePacket packet)
//     {
//         instance.network.sendToServer(packet);
//     }
// 
//     public static void sendToClients(WorldServer world, BlockPos pos, BasePacket packet)
//     {
//         Chunk chunk = world.getChunkFromBlockCoords(pos);
//         for (EntityPlayer player : world.playerEntities)
//         {
//             if (!(player instanceof EntityPlayerMP))
//             {
//                 continue;
//             }
//             EntityPlayerMP playerMP = (EntityPlayerMP) player;
//             if (world.getPlayerChunkMap().isPlayerWatchingChunk(playerMP, chunk.x, chunk.z))
//             {
// //                LogHelper.info("Sending packet to: " + player.getName());
//                 TMGNetwork.sendTo(packet, playerMP);
//             }
//         }
//     }
// }


// Path: src/main/java/com/m4thg33k/tombmanygraves/commands/CommandToggleRender.java
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import com.m4thg33k.tombmanygraves.network.GraveRenderTogglePacket;
import com.m4thg33k.tombmanygraves.network.TMGNetwork;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;

package com.m4thg33k.tombmanygraves.commands;





public class CommandToggleRender extends CommandBase {

    public CommandToggleRender()
    {
        super("tmg_toggle_render", 0, true);
    }

    @Override
    @Nonnull
    @ParametersAreNonnullByDefault
    public String getUsage(ICommandSender sender) {
        return COMMAND_NAME;
    }

    @Override
    @ParametersAreNonnullByDefault
    public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
        if (!(sender instanceof EntityPlayerMP))
        {
            return;
        }
        TMGNetwork.sendTo(new GraveRenderTogglePacket(), (EntityPlayerMP)sender);