Program: 117167
Project: 117167
Buggy source:
public ActionResult<ItemStack> handleRightClick(ItemStack stack,World world,EntityPlayer player,EnumHand hand){
  player.inventory.addItemStackToInventory(new ItemStack(Blocks.END_GATEWAY,64));
  int mode=ItemNBTHelper.getInteger(stack,"String_Node_Str",0);
  if (player.isSneaking()) {
    mode++;
    if (mode == MODES.size()) {
      mode=0;
    }
    if (!world.isRemote) {
      player.addChatComponentMessage(new TextComponentString(MODES.get(mode)));
    }
    ItemNBTHelper.setInteger(stack,"String_Node_Str",mode);
    return new ActionResult<ItemStack>(EnumActionResult.SUCCESS,stack);
  }
switch (mode) {
case 0:
    break;
case 3:
  if (world.isRemote) {
    Map<ResourceLocation,ArrayDeque<Particle>[][]> texturedRenderQueue=ReflectionHelper.getPrivateValue(BCEffectRenderer.class,BCEffectHandler.effectRenderer,"String_Node_Str");
    for (    ArrayDeque<Particle>[][] array : texturedRenderQueue.values()) {
      for (      ArrayDeque<Particle>[] array2 : array) {
        for (        ArrayDeque<Particle> particle : array2) {
          LogHelper.info(particle);
        }
      }
    }
  }
break;
case 4:
if (!world.isRemote) {
player.openGui(DraconicEvolution.instance,2016,world,0,0,0);
}
break;
case 5:
if (world instanceof WorldServer) {
FMLLog.info("String_Node_Str");
BlockPlacementBatcher batcher=new BlockPlacementBatcher((WorldServer)world);
for (int x=-120; x < 120; x++) {
for (int y=0; y < 100; y++) {
for (int z=-120; z < 120; z++) {
  BlockPos posAt=new BlockPos(player.posX + x,y,player.posZ + z);
  if (posAt.getY() == 63 || world.getBlockState(posAt).getBlock() == Blocks.BEDROCK || world.getBlockState(posAt).getBlock() == Blocks.STONE || world.getBlockState(posAt).getBlock() == Blocks.DIRT || world.getBlockState(posAt).getBlock() == Blocks.GRASS || world.getBlockState(posAt).getBlock().getRegistryName().getResourceDomain().contains("String_Node_Str") || world.getBlockState(posAt).getBlock().getRegistryName().getResourcePath().contains("String_Node_Str")) {
    batcher.setBlockState(posAt,Blocks.AIR.getDefaultState());
  }
}
}
}
batcher.finish();
}
BlockPos pos=new BlockPos(player);
for (int x=-10; x < 10; x++) {
for (int z=-10; z < 10; z++) {
world.getChunkFromBlockCoords(pos.add(x * 16,0,z * 16)).generateSkylightMap();
}
}
break;
}
return new ActionResult<ItemStack>(EnumActionResult.PASS,stack);
}

Fixed version (ground truth):
public ActionResult<ItemStack> handleRightClick(ItemStack stack,World world,EntityPlayer player,EnumHand hand){
  player.inventory.addItemStackToInventory(new ItemStack(Blocks.END_GATEWAY,64));
  int mode=ItemNBTHelper.getInteger(stack,"String_Node_Str",0);
  if (player.isSneaking()) {
    mode++;
    if (mode == MODES.size()) {
      mode=0;
    }
    if (!world.isRemote) {
      player.addChatComponentMessage(new TextComponentString(MODES.get(mode)));
    }
    ItemNBTHelper.setInteger(stack,"String_Node_Str",mode);
    return new ActionResult<ItemStack>(EnumActionResult.SUCCESS,stack);
  }
switch (mode) {
case 0:
    break;
case 3:
  if (world.isRemote) {
    Map<ResourceLocation,ArrayDeque<Particle>[][]> texturedRenderQueue=ReflectionHelper.getPrivateValue(BCEffectRenderer.class,BCEffectHandler.effectRenderer,"String_Node_Str");
    for (    ArrayDeque<Particle>[][] array : texturedRenderQueue.values()) {
      for (      ArrayDeque<Particle>[] array2 : array) {
        for (        ArrayDeque<Particle> particle : array2) {
          LogHelper.info(particle);
        }
      }
    }
  }
break;
case 4:
if (!world.isRemote) {
player.openGui(DraconicEvolution.instance,2016,world,0,0,0);
}
break;
case 5:
if (world instanceof WorldServer) {
FMLLog.info("String_Node_Str");
}
BlockPos pos=new BlockPos(player);
for (int x=-10; x < 10; x++) {
for (int z=-10; z < 10; z++) {
world.getChunkFromBlockCoords(pos.add(x * 16,0,z * 16)).generateSkylightMap();
}
}
break;
}
return new ActionResult<ItemStack>(EnumActionResult.PASS,stack);
}