package com.carpentersblocks.network;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import com.carpentersblocks.block.BlockCarpentersSlope;

public class PacketSlopeSelect implements ICarpentersPacket {

    private int slot = 0;
    private boolean incDamage = false;

    public PacketSlopeSelect() {}

    public PacketSlopeSelect(int slot, boolean incDamage)
    {
        this.slot = slot;
        this.incDamage = incDamage;
    }

    @Override
    public void processData(EntityPlayer entityPlayer, ByteBufInputStream bbis) throws IOException
    {
        int slot = bbis.readInt();
        boolean incDmg = bbis.readBoolean();
        ItemStack itemStack = entityPlayer.inventory.getStackInSlot(slot);

        if (itemStack != null) {

            int maxDmg = BlockCarpentersSlope.slopeType.length - 1;
            int itemDmg = itemStack.getItemDamage();
            itemDmg += incDmg ? 1 : -1;

            if (itemDmg > maxDmg) {
                itemDmg = 0;
            } else if (itemDmg < 0) {
                itemDmg = maxDmg;
            }

            itemStack.setItemDamage(itemDmg);

        }
    }

    @Override
    public void appendData(ByteBuf buffer) throws IOException
    {
        buffer.writeInt(slot);
        buffer.writeBoolean(incDamage);
    }

}

@@ -276,16 +276,123 @@
 rsSlope;
+%0Aimport com.carpentersblocks.util.BlockProperties;%0Aimport com.carpentersblocks.util.registry.BlockRegistry;
 %0A%0Apublic
@@ -986,16 +986,97 @@
  != null
+ && BlockProperties.toBlock(itemStack).equals(BlockRegistry.blockCarpentersSlope)
 ) %7B%0A%0A   

Add one last piece of slope select protection.