Decompiled source of Minecraft Scraps v1.0.0

plugins/4902-minecraft_scraps.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Steamworks;
using Steamworks.Data;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace mcs;

[BepInPlugin("4902.Minecraft_Scraps", "Minecraft_Scraps", "1.0.0")]
public class yon : BaseUnityPlugin
{
	private readonly Harmony harmony = new Harmony("4902.Minecraft_Scraps");

	public static ManualLogSource mls;

	public static ConfigEntry<int> base_percentage;

	public static ConfigEntry<int> cfg_diamond_block;

	public static ConfigEntry<int> cfg_spider;

	public static ConfigEntry<int> cfg_zombie;

	public static ConfigEntry<int> cfg_villager;

	public static ConfigEntry<int> cfg_creeper;

	public static ConfigEntry<int> cfg_pumpkin;

	public static ConfigEntry<int> cfg_anvil;

	public static ConfigEntry<int> cfg_steve;

	public static ConfigEntry<int> cfg_tnt;

	public static ConfigEntry<int> cfg_diamond;

	public static ConfigEntry<int> cfg_diamond_sword;

	public static ConfigEntry<int> cfg_diamond_pickaxe;

	public static ConfigEntry<int> cfg_apple;

	public static ConfigEntry<int> cfg_torch;

	private void Awake()
	{
		base_percentage = ((BaseUnityPlugin)this).Config.Bind<int>("", "base_percent", 80, "percentage that a minecraft scrap will replace magnifying glass\ninput = percentage, 50 is 50% etc");
		cfg_diamond_block = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "diamond_block", 20, "item types with higher numbers relative to other item types will be more frequent\n(if there are (10 red, 20 green, 30 blue) blocks, and if one block was selected randomly, the color with more blocks would be more likely to be selected, and a color with no blocks couldn't be selected)\n(color is the item type, number of blocks is the config number)");
		cfg_spider = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "spider", 35, "");
		cfg_zombie = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "zombie", 35, "");
		cfg_villager = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "villager", 30, "");
		cfg_creeper = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "creeper", 35, "");
		cfg_pumpkin = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "pumpkin", 35, "");
		cfg_anvil = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "anvil", 20, "");
		cfg_steve = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "steve", 1, "");
		cfg_tnt = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "tnt", 25, "");
		cfg_diamond = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "diamond", 30, "");
		cfg_diamond_sword = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "diamond_sword", 25, "");
		cfg_diamond_pickaxe = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "diamond_pickaxe", 25, "");
		cfg_apple = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "apple", 35, "");
		cfg_torch = ((BaseUnityPlugin)this).Config.Bind<int>("Items", "torch", 35, "");
		mls = Logger.CreateLogSource("Minecraft Scraps");
		mls.LogInfo((object)"1.12.2");
		harmony.PatchAll(typeof(go));
		harmony.PatchAll(typeof(pcb));
		harmony.PatchAll(typeof(hm));
	}
}
[HarmonyPatch(typeof(GrabbableObject))]
internal class go
{
	public static int items = 15;

	public static string[] item = new string[items];

	public static Mesh[] fish = (Mesh[])(object)new Mesh[items];

	public static Material[][] cats = new Material[items][];

	public static AudioClip[] take = (AudioClip[])(object)new AudioClip[items];

	public static AudioClip[] give = (AudioClip[])(object)new AudioClip[items];

	private static bool[] dots = new bool[items];

	private static int[] weights = new int[items];

	[HarmonyPatch("Start")]
	private static void Postfix(GrabbableObject __instance, ref MeshRenderer ___mainObjectRenderer)
	{
		//IL_085c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0861: Unknown result type (might be due to invalid IL or missing references)
		//IL_0865: Unknown result type (might be due to invalid IL or missing references)
		//IL_0acb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ae7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b0d: Unknown result type (might be due to invalid IL or missing references)
		//IL_094e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0953: Unknown result type (might be due to invalid IL or missing references)
		//IL_0957: Unknown result type (might be due to invalid IL or missing references)
		//IL_095c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0df7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e13: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e39: Unknown result type (might be due to invalid IL or missing references)
		//IL_0be0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0be5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0be9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bee: Unknown result type (might be due to invalid IL or missing references)
		//IL_1069: Unknown result type (might be due to invalid IL or missing references)
		//IL_1085: Unknown result type (might be due to invalid IL or missing references)
		//IL_10ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f0c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f11: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f15: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f1a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0976: Unknown result type (might be due to invalid IL or missing references)
		//IL_097b: Unknown result type (might be due to invalid IL or missing references)
		//IL_097d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0982: Unknown result type (might be due to invalid IL or missing references)
		//IL_0997: Unknown result type (might be due to invalid IL or missing references)
		//IL_09a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_09a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a55: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a5a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a5c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a61: Unknown result type (might be due to invalid IL or missing references)
		//IL_131b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1337: Unknown result type (might be due to invalid IL or missing references)
		//IL_135d: Unknown result type (might be due to invalid IL or missing references)
		//IL_117e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1183: Unknown result type (might be due to invalid IL or missing references)
		//IL_1187: Unknown result type (might be due to invalid IL or missing references)
		//IL_118c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c08: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c0f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c14: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c29: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c33: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c38: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d81: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d86: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d88: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d8d: Unknown result type (might be due to invalid IL or missing references)
		//IL_15ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_15c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_15ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_1430: Unknown result type (might be due to invalid IL or missing references)
		//IL_1435: Unknown result type (might be due to invalid IL or missing references)
		//IL_1439: Unknown result type (might be due to invalid IL or missing references)
		//IL_143e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f34: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f39: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f3b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f40: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f55: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f5f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f64: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ff3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ff8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ffa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fff: Unknown result type (might be due to invalid IL or missing references)
		//IL_1953: Unknown result type (might be due to invalid IL or missing references)
		//IL_196f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1995: Unknown result type (might be due to invalid IL or missing references)
		//IL_16c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_16c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_16cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_16d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_11a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_11ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_11ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_11b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_11c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_11d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_11d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_12a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_12aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_12ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_12b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_1d19: Unknown result type (might be due to invalid IL or missing references)
		//IL_1d35: Unknown result type (might be due to invalid IL or missing references)
		//IL_1d5b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a68: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a6d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a71: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a76: Unknown result type (might be due to invalid IL or missing references)
		//IL_1458: Unknown result type (might be due to invalid IL or missing references)
		//IL_145d: Unknown result type (might be due to invalid IL or missing references)
		//IL_145f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1464: Unknown result type (might be due to invalid IL or missing references)
		//IL_1479: Unknown result type (might be due to invalid IL or missing references)
		//IL_1483: Unknown result type (might be due to invalid IL or missing references)
		//IL_1488: Unknown result type (might be due to invalid IL or missing references)
		//IL_1537: Unknown result type (might be due to invalid IL or missing references)
		//IL_153c: Unknown result type (might be due to invalid IL or missing references)
		//IL_153e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1543: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f8b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1fa7: Unknown result type (might be due to invalid IL or missing references)
		//IL_1fcd: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e2e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e33: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e37: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e3c: Unknown result type (might be due to invalid IL or missing references)
		//IL_16ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_16ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_16f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_16f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_170b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1715: Unknown result type (might be due to invalid IL or missing references)
		//IL_171a: Unknown result type (might be due to invalid IL or missing references)
		//IL_18dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_18e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_18e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_18e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_222c: Unknown result type (might be due to invalid IL or missing references)
		//IL_2248: Unknown result type (might be due to invalid IL or missing references)
		//IL_226e: Unknown result type (might be due to invalid IL or missing references)
		//IL_20a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_20a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_20ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_20b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a90: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a95: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a97: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a9c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ab1: Unknown result type (might be due to invalid IL or missing references)
		//IL_1abb: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ac0: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ca3: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ca8: Unknown result type (might be due to invalid IL or missing references)
		//IL_1caa: Unknown result type (might be due to invalid IL or missing references)
		//IL_1caf: Unknown result type (might be due to invalid IL or missing references)
		//IL_2644: Unknown result type (might be due to invalid IL or missing references)
		//IL_2660: Unknown result type (might be due to invalid IL or missing references)
		//IL_2686: Unknown result type (might be due to invalid IL or missing references)
		//IL_2353: Unknown result type (might be due to invalid IL or missing references)
		//IL_2358: Unknown result type (might be due to invalid IL or missing references)
		//IL_235c: Unknown result type (might be due to invalid IL or missing references)
		//IL_2361: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e56: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e5b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e5d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e62: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e77: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e81: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e86: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f15: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f1a: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f1c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f21: Unknown result type (might be due to invalid IL or missing references)
		//IL_2aa5: Unknown result type (might be due to invalid IL or missing references)
		//IL_2ac1: Unknown result type (might be due to invalid IL or missing references)
		//IL_2ae7: Unknown result type (might be due to invalid IL or missing references)
		//IL_2762: Unknown result type (might be due to invalid IL or missing references)
		//IL_2767: Unknown result type (might be due to invalid IL or missing references)
		//IL_276b: Unknown result type (might be due to invalid IL or missing references)
		//IL_2770: Unknown result type (might be due to invalid IL or missing references)
		//IL_20cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_20d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_20d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_20d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_20ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_20f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_2100: Unknown result type (might be due to invalid IL or missing references)
		//IL_2105: Unknown result type (might be due to invalid IL or missing references)
		//IL_21b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_21b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_21bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_21c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_2f06: Unknown result type (might be due to invalid IL or missing references)
		//IL_2f22: Unknown result type (might be due to invalid IL or missing references)
		//IL_2f48: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bc3: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bc8: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bcc: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bd1: Unknown result type (might be due to invalid IL or missing references)
		//IL_237b: Unknown result type (might be due to invalid IL or missing references)
		//IL_2380: Unknown result type (might be due to invalid IL or missing references)
		//IL_2382: Unknown result type (might be due to invalid IL or missing references)
		//IL_2387: Unknown result type (might be due to invalid IL or missing references)
		//IL_239c: Unknown result type (might be due to invalid IL or missing references)
		//IL_23a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_23ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_2538: Unknown result type (might be due to invalid IL or missing references)
		//IL_253d: Unknown result type (might be due to invalid IL or missing references)
		//IL_253f: Unknown result type (might be due to invalid IL or missing references)
		//IL_2544: Unknown result type (might be due to invalid IL or missing references)
		//IL_320b: Unknown result type (might be due to invalid IL or missing references)
		//IL_3227: Unknown result type (might be due to invalid IL or missing references)
		//IL_324d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3024: Unknown result type (might be due to invalid IL or missing references)
		//IL_3029: Unknown result type (might be due to invalid IL or missing references)
		//IL_302d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3032: Unknown result type (might be due to invalid IL or missing references)
		//IL_278a: Unknown result type (might be due to invalid IL or missing references)
		//IL_278f: Unknown result type (might be due to invalid IL or missing references)
		//IL_2791: Unknown result type (might be due to invalid IL or missing references)
		//IL_2796: Unknown result type (might be due to invalid IL or missing references)
		//IL_27ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_27b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_27ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_2a2d: Unknown result type (might be due to invalid IL or missing references)
		//IL_2a32: Unknown result type (might be due to invalid IL or missing references)
		//IL_2a34: Unknown result type (might be due to invalid IL or missing references)
		//IL_2a39: Unknown result type (might be due to invalid IL or missing references)
		//IL_34c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_34e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_350a: Unknown result type (might be due to invalid IL or missing references)
		//IL_3329: Unknown result type (might be due to invalid IL or missing references)
		//IL_332e: Unknown result type (might be due to invalid IL or missing references)
		//IL_3332: Unknown result type (might be due to invalid IL or missing references)
		//IL_3337: Unknown result type (might be due to invalid IL or missing references)
		//IL_2beb: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bf0: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bf2: Unknown result type (might be due to invalid IL or missing references)
		//IL_2bf7: Unknown result type (might be due to invalid IL or missing references)
		//IL_2c0c: Unknown result type (might be due to invalid IL or missing references)
		//IL_2c16: Unknown result type (might be due to invalid IL or missing references)
		//IL_2c1b: Unknown result type (might be due to invalid IL or missing references)
		//IL_2e8e: Unknown result type (might be due to invalid IL or missing references)
		//IL_2e93: Unknown result type (might be due to invalid IL or missing references)
		//IL_2e95: Unknown result type (might be due to invalid IL or missing references)
		//IL_2e9a: Unknown result type (might be due to invalid IL or missing references)
		//IL_304c: Unknown result type (might be due to invalid IL or missing references)
		//IL_3051: Unknown result type (might be due to invalid IL or missing references)
		//IL_3053: Unknown result type (might be due to invalid IL or missing references)
		//IL_3058: Unknown result type (might be due to invalid IL or missing references)
		//IL_306d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3077: Unknown result type (might be due to invalid IL or missing references)
		//IL_307c: Unknown result type (might be due to invalid IL or missing references)
		//IL_3111: Unknown result type (might be due to invalid IL or missing references)
		//IL_3116: Unknown result type (might be due to invalid IL or missing references)
		//IL_3118: Unknown result type (might be due to invalid IL or missing references)
		//IL_311d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3351: Unknown result type (might be due to invalid IL or missing references)
		//IL_3356: Unknown result type (might be due to invalid IL or missing references)
		//IL_3358: Unknown result type (might be due to invalid IL or missing references)
		//IL_335d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3372: Unknown result type (might be due to invalid IL or missing references)
		//IL_337c: Unknown result type (might be due to invalid IL or missing references)
		//IL_3381: Unknown result type (might be due to invalid IL or missing references)
		//IL_3450: Unknown result type (might be due to invalid IL or missing references)
		//IL_3455: Unknown result type (might be due to invalid IL or missing references)
		//IL_3457: Unknown result type (might be due to invalid IL or missing references)
		//IL_345c: Unknown result type (might be due to invalid IL or missing references)
		if (!(((Object)__instance.itemProperties).name == "MagnifyingGlass"))
		{
			return;
		}
		MeshFilter component = ((Component)___mainObjectRenderer).GetComponent<MeshFilter>();
		if (item[0] == null)
		{
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "4902-minecraft_scraps").Replace("\\", "/");
			yon.mls.LogMessage((object)("Searching this filepath:" + text));
			AssetBundle assetBundle = AssetBundle.LoadFromFileAsync(text).assetBundle;
			item[0] = __instance.itemProperties.itemName;
			fish[0] = component.mesh;
			cats[0] = ((Renderer)___mainObjectRenderer).materials;
			take[0] = __instance.itemProperties.grabSFX;
			give[0] = __instance.itemProperties.dropSFX;
			item[1] = "Diamond block";
			fish[1] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<Mesh>("minecraft diamond block.fbx")));
			cats[1] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("diamond-minecraft-2.mat") };
			take[1] = assetBundle.LoadAsset<AudioClip>("block place1.ogg");
			give[1] = assetBundle.LoadAsset<AudioClip>("block place2.ogg");
			item[2] = "Spider";
			fish[2] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<Mesh>("Spider.fbx")));
			cats[2] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("spider.mat") };
			take[2] = assetBundle.LoadAsset<AudioClip>("spider1.ogg");
			give[2] = assetBundle.LoadAsset<AudioClip>("spider2.ogg");
			item[3] = "Zombie";
			fish[3] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<Mesh>("Zombie.fbx")));
			cats[3] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("zombie.mat") };
			take[3] = assetBundle.LoadAsset<AudioClip>("zombie1.ogg");
			give[3] = assetBundle.LoadAsset<AudioClip>("zombie2.ogg");
			item[4] = "Villager";
			fish[4] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<Mesh>("Villager.fbx")));
			cats[4] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("villager_farmer.mat") };
			take[4] = assetBundle.LoadAsset<AudioClip>("villager1.ogg");
			give[4] = assetBundle.LoadAsset<AudioClip>("villager2.ogg");
			item[5] = "Creeper";
			fish[5] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<Mesh>("Creeper.fbx")));
			cats[5] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("creeper.mat") };
			take[5] = assetBundle.LoadAsset<AudioClip>("creeper.ogg");
			give[5] = take[5];
			item[6] = "Pumpkin";
			fish[6] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<GameObject>("pumpkin.obj").GetComponentInChildren<MeshFilter>().mesh));
			cats[6] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("pumpkin.mat") };
			take[6] = take[1];
			give[6] = give[1];
			item[7] = "Anvil";
			fish[7] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<GameObject>("mineways2skfb.obj").GetComponentInChildren<MeshFilter>().mesh));
			cats[7] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("mineways2skfb-rgba.mat") };
			take[7] = assetBundle.LoadAsset<AudioClip>("anvil1.ogg");
			give[7] = assetBundle.LoadAsset<AudioClip>("anvil2.ogg");
			item[8] = "Steve";
			fish[8] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<Mesh>("steve.fbx")));
			cats[8] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("steve.mat") };
			take[8] = take[0];
			give[8] = give[0];
			item[9] = "TNT";
			fish[9] = Object.Instantiate<Mesh>(assetBundle.LoadAsset<Mesh>("mesh_id27_0_0.asset"));
			cats[9] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("60_0.mat") };
			take[9] = assetBundle.LoadAsset<AudioClip>("tnt1.ogg");
			give[9] = assetBundle.LoadAsset<AudioClip>("tnt2.ogg");
			item[10] = "Diamond";
			fish[10] = Object.Instantiate<Mesh>(assetBundle.LoadAsset<Mesh>("cube_0_0_0.asset"));
			cats[10] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("material_0.mat") };
			take[10] = take[1];
			give[10] = give[1];
			item[11] = "Diamond sword";
			fish[11] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<GameObject>("diamondsword.obj").GetComponentInChildren<MeshFilter>().mesh));
			cats[11] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("diffuse1.mat") };
			take[11] = take[1];
			give[11] = give[1];
			item[12] = "Diamond pickaxe";
			fish[12] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<GameObject>("diamond-pickaxe.obj").GetComponentInChildren<MeshFilter>().mesh));
			cats[12] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("diffuse2.mat") };
			take[12] = take[1];
			give[12] = give[1];
			item[13] = "Apple";
			fish[13] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<GameObject>("apple.blend").GetComponentInChildren<MeshFilter>().mesh));
			cats[13] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("apple.mat") };
			take[13] = assetBundle.LoadAsset<AudioClip>("eat1.ogg");
			give[13] = take[13];
			item[14] = "Torch";
			fish[14] = Object.Instantiate<Mesh>(fish1.fish2(assetBundle.LoadAsset<GameObject>("torch.obj").GetComponentInChildren<MeshFilter>().mesh));
			cats[14] = (Material[])(object)new Material[1] { assetBundle.LoadAsset<Material>("torch_diffuse.mat") };
			take[14] = take[1];
			give[14] = give[1];
			weights[0] = 0;
			weights[1] = yon.cfg_diamond_block.Value;
			weights[2] = yon.cfg_spider.Value;
			weights[3] = yon.cfg_zombie.Value;
			weights[4] = yon.cfg_villager.Value;
			weights[5] = yon.cfg_creeper.Value;
			weights[6] = yon.cfg_pumpkin.Value;
			weights[7] = yon.cfg_anvil.Value;
			weights[8] = yon.cfg_steve.Value;
			weights[9] = yon.cfg_tnt.Value;
			weights[10] = yon.cfg_diamond.Value;
			weights[11] = yon.cfg_diamond_sword.Value;
			weights[12] = yon.cfg_diamond_pickaxe.Value;
			weights[13] = yon.cfg_apple.Value;
			weights[14] = yon.cfg_torch.Value;
			for (int i = 1; i < weights.Length; i++)
			{
				if (weights[i] < 0)
				{
					weights[i] = 0;
				}
				weights[0] = weights[0] + weights[i];
			}
		}
		if (item[0] == null)
		{
			return;
		}
		Random random;
		if (GameNetworkManager.Instance.disableSteam)
		{
			random = new Random();
		}
		else
		{
			Lobby value = GameNetworkManager.Instance.currentLobby.Value;
			random = new Random((int)((SteamId.op_Implicit(((Lobby)(ref value)).Id) + ((Component)__instance).GetComponent<NetworkObject>().NetworkObjectId) % 1000000000));
		}
		Random random2 = random;
		if (random2.Next(0, 100) < yon.base_percentage.Value)
		{
			int num = random2.Next(1, weights[0] + 1);
			int num2 = 0;
			int num3 = 0;
			for (num2 = 1; num2 < weights.Length; num2++)
			{
				num3 += weights[num2];
				if (num3 >= num)
				{
					break;
				}
			}
			Bounds bounds;
			switch (num2)
			{
			case 1:
			{
				component.mesh = fish[1];
				if (!dots[1])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference4 = ref vertices[i];
						reference4 = vertices[i] - center;
						ref Vector3 reference5 = ref vertices[i];
						reference5 = vertices[i] * 90f;
						float x = vertices[i].x;
						float z = vertices[i].z;
						float x2 = normals[i].x;
						float z2 = normals[i].z;
						vertices[i].x = 0f - z;
						vertices[i].z = x;
						normals[i].x = 0f - z2;
						normals[i].z = x2;
						vertices[i].x = vertices[i].x - 0.5f;
						ref Vector3 reference6 = ref vertices[i];
						reference6 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[1] = mesh;
					dots[1] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.5f, 0f, 0f);
				component2.size = new Vector3(1.9f, 1.9f, 1.9f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.5f, 0f, 0f);
				__instance.itemProperties.itemName = item[1];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[1];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[1];
				((Renderer)___mainObjectRenderer).materials = cats[1];
				__instance.itemProperties.grabSFX = take[1];
				__instance.itemProperties.dropSFX = give[1];
				break;
			}
			case 2:
			{
				component.mesh = fish[2];
				if (!dots[2])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference40 = ref vertices[i];
						reference40 = vertices[i] - center;
						ref Vector3 reference41 = ref vertices[i];
						reference41 = vertices[i] * 3f;
						float x = vertices[i].x;
						float z = vertices[i].z;
						float x2 = normals[i].x;
						float z2 = normals[i].z;
						vertices[i].x = 0f - z;
						vertices[i].z = x;
						normals[i].x = 0f - z2;
						normals[i].z = x2;
						float y3 = vertices[i].y;
						float z5 = vertices[i].z;
						float y4 = normals[i].y;
						float z6 = normals[i].z;
						vertices[i].y = z5;
						vertices[i].z = 0f - y3;
						normals[i].y = z6;
						normals[i].z = 0f - y4;
						vertices[i].y = vertices[i].y - 0.24f;
						vertices[i].x = vertices[i].x + 0.1f;
						ref Vector3 reference42 = ref vertices[i];
						reference42 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[2] = mesh;
					dots[2] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(0.05f, 0f, 0f);
				component2.size = new Vector3(0.65f, 1.9f, 1.9f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(0.05f, 0f, 0f);
				__instance.itemProperties.itemName = item[2];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[2];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[2];
				((Renderer)___mainObjectRenderer).materials = cats[2];
				__instance.itemProperties.grabSFX = take[2];
				__instance.itemProperties.dropSFX = give[2];
				break;
			}
			case 3:
			{
				component.mesh = fish[3];
				if (!dots[3])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference25 = ref vertices[i];
						reference25 = vertices[i] - center;
						ref Vector3 reference26 = ref vertices[i];
						reference26 = vertices[i] * 3f;
						float x = vertices[i].x;
						float y = vertices[i].y;
						float x2 = normals[i].x;
						float y2 = normals[i].y;
						vertices[i].x = y;
						vertices[i].y = 0f - x;
						normals[i].x = y2;
						normals[i].y = 0f - x2;
						ref Vector3 reference27 = ref vertices[i];
						reference27 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[3] = mesh;
					dots[3] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(0.05f, 0f, 0f);
				component2.size = new Vector3(0.65f, 1.2f, 2.4f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(0.05f, 0f, 0f);
				__instance.itemProperties.itemName = item[3];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[3];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[3];
				((Renderer)___mainObjectRenderer).materials = cats[3];
				__instance.itemProperties.grabSFX = take[3];
				__instance.itemProperties.dropSFX = give[3];
				break;
			}
			case 4:
			{
				component.mesh = fish[4];
				if (!dots[4])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference22 = ref vertices[i];
						reference22 = vertices[i] - center;
						ref Vector3 reference23 = ref vertices[i];
						reference23 = vertices[i] * 3f;
						float x = vertices[i].x;
						float y = vertices[i].y;
						float x2 = vertices[i].x;
						float y2 = vertices[i].y;
						vertices[i].x = y;
						vertices[i].y = 0f - x;
						normals[i].x = y2;
						normals[i].y = 0f - x2;
						vertices[i].z = vertices[i].z + 0.4f;
						vertices[i].y = vertices[i].y + 0.05f;
						ref Vector3 reference24 = ref vertices[i];
						reference24 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[4] = mesh;
					dots[4] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(0.05f, 0f, 0.1f);
				component2.size = new Vector3(0.65f, 1.2f, 2.6f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(0.05f, 0f, 0f);
				__instance.itemProperties.itemName = item[4];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[4];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[4];
				((Renderer)___mainObjectRenderer).materials = cats[4];
				__instance.itemProperties.grabSFX = take[4];
				__instance.itemProperties.dropSFX = give[4];
				break;
			}
			case 5:
			{
				component.mesh = fish[5];
				if (!dots[5])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference31 = ref vertices[i];
						reference31 = vertices[i] - center;
						ref Vector3 reference32 = ref vertices[i];
						reference32 = vertices[i] * 3f;
						float x = vertices[i].x;
						float y = vertices[i].y;
						float x2 = normals[i].x;
						float y2 = normals[i].y;
						vertices[i].x = y;
						vertices[i].y = 0f - x;
						normals[i].x = y2;
						normals[i].y = 0f - x2;
						vertices[i].z = vertices[i].z + 0.25f;
						ref Vector3 reference33 = ref vertices[i];
						reference33 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[5] = mesh;
					dots[5] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(0.05f, 0f, 0.25f);
				component2.size = new Vector3(0.65f, 0.6f, 1.9f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(0.05f, 0f, 0.25f);
				__instance.itemProperties.itemName = item[5];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[5];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[5];
				((Renderer)___mainObjectRenderer).materials = cats[5];
				__instance.itemProperties.grabSFX = take[5];
				__instance.itemProperties.dropSFX = give[5];
				break;
			}
			case 6:
			{
				component.mesh = fish[6];
				if (!dots[6])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference13 = ref vertices[i];
						reference13 = vertices[i] - center;
						ref Vector3 reference14 = ref vertices[i];
						reference14 = vertices[i] * 1.11f;
						float x = vertices[i].x;
						float z = vertices[i].z;
						float x2 = normals[i].x;
						float z2 = normals[i].z;
						vertices[i].x = 0f - z;
						vertices[i].z = x;
						normals[i].x = 0f - z2;
						normals[i].z = x2;
						float x3 = vertices[i].x;
						float y3 = vertices[i].y;
						float x4 = normals[i].x;
						float y4 = normals[i].y;
						vertices[i].x = 0f - y3;
						vertices[i].y = x3;
						normals[i].x = 0f - y4;
						normals[i].y = x4;
						float y5 = vertices[i].y;
						float z3 = vertices[i].z;
						float y6 = normals[i].y;
						float z4 = normals[i].z;
						vertices[i].y = z3;
						vertices[i].z = 0f - y5;
						normals[i].y = z4;
						normals[i].z = 0f - y6;
						vertices[i].y = vertices[i].y - 0.8f;
						vertices[i].x = vertices[i].x - 0.5f;
						ref Vector3 reference15 = ref vertices[i];
						reference15 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[6] = mesh;
					dots[6] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.5f, 0f, 0f);
				component2.size = new Vector3(1.9f, 1.9f, 1.9f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.5f, 0f, 0f);
				__instance.itemProperties.itemName = item[6];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[6];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[6];
				((Renderer)___mainObjectRenderer).materials = cats[6];
				__instance.itemProperties.grabSFX = take[6];
				__instance.itemProperties.dropSFX = give[6];
				break;
			}
			case 7:
			{
				component.mesh = fish[7];
				if (!dots[7])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference19 = ref vertices[i];
						reference19 = vertices[i] - center;
						ref Vector3 reference20 = ref vertices[i];
						reference20 = vertices[i] * 3.5f;
						float x = vertices[i].x;
						float z = vertices[i].z;
						float x2 = normals[i].x;
						float z2 = normals[i].z;
						vertices[i].x = 0f - z;
						vertices[i].z = x;
						normals[i].x = 0f - z2;
						normals[i].z = x2;
						float x3 = vertices[i].x;
						float y3 = vertices[i].y;
						float x4 = normals[i].x;
						float y4 = normals[i].y;
						vertices[i].x = 0f - y3;
						vertices[i].y = x3;
						normals[i].x = 0f - y4;
						normals[i].y = x4;
						float y5 = vertices[i].y;
						float z3 = vertices[i].z;
						float y6 = normals[i].y;
						float z4 = normals[i].z;
						vertices[i].y = z3;
						vertices[i].z = 0f - y5;
						normals[i].y = z4;
						normals[i].z = 0f - y6;
						vertices[i].y = vertices[i].y - 0.25f;
						vertices[i].x = vertices[i].x - 0.25f;
						vertices[i].z = vertices[i].z - 0.25f;
						ref Vector3 reference21 = ref vertices[i];
						reference21 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[7] = mesh;
					dots[7] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.5f, 0f, 0f);
				component2.size = new Vector3(1.9f, 1.9f, 1.425f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.5f, 0f, 0f);
				__instance.itemProperties.itemName = item[7];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[7];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[7];
				((Renderer)___mainObjectRenderer).materials = cats[7];
				__instance.itemProperties.grabSFX = take[7];
				__instance.itemProperties.dropSFX = give[7];
				break;
			}
			case 8:
			{
				component.mesh = fish[8];
				if (!dots[8])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference7 = ref vertices[i];
						reference7 = vertices[i] - center;
						ref Vector3 reference8 = ref vertices[i];
						reference8 = vertices[i] * 3f;
						float x = vertices[i].x;
						float y = vertices[i].y;
						float x2 = normals[i].x;
						float y2 = normals[i].y;
						vertices[i].x = y;
						vertices[i].y = 0f - x;
						normals[i].x = y2;
						normals[i].y = 0f - x2;
						ref Vector3 reference9 = ref vertices[i];
						reference9 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[8] = mesh;
					dots[8] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(0.05f, 0f, 0f);
				component2.size = new Vector3(0.65f, 1.2f, 2.4f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(0.05f, 0f, 0f);
				__instance.itemProperties.itemName = item[8];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[8];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[8];
				((Renderer)___mainObjectRenderer).materials = cats[8];
				__instance.itemProperties.grabSFX = take[8];
				__instance.itemProperties.dropSFX = give[8];
				break;
			}
			case 9:
			{
				component.mesh = fish[9];
				if (!dots[9])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference34 = ref vertices[i];
						reference34 = vertices[i] - center;
						ref Vector3 reference35 = ref vertices[i];
						reference35 = vertices[i] * 0.005f * 1.044f;
						float x = vertices[i].x;
						float y = vertices[i].y;
						float x2 = normals[i].x;
						float y2 = normals[i].y;
						vertices[i].x = 0f - y;
						vertices[i].y = x;
						normals[i].x = 0f - y2;
						normals[i].y = x2;
						vertices[i].x = vertices[i].x - 0.5f;
						ref Vector3 reference36 = ref vertices[i];
						reference36 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[9] = mesh;
					dots[9] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.5f, 0f, 0f);
				component2.size = new Vector3(1.9f, 1.9f, 1.9f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.5f, 0f, 0f);
				__instance.itemProperties.itemName = item[9];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[9];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[9];
				((Renderer)___mainObjectRenderer).materials = cats[9];
				__instance.itemProperties.grabSFX = take[9];
				__instance.itemProperties.dropSFX = give[9];
				break;
			}
			case 10:
			{
				component.mesh = fish[10];
				if (!dots[10])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					int[] triangles = mesh.triangles;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference28 = ref vertices[i];
						reference28 = vertices[i] - center;
						ref Vector3 reference29 = ref vertices[i];
						reference29 = vertices[i] * 0.75f;
						float y = vertices[i].y;
						float z = vertices[i].z;
						float y2 = normals[i].y;
						float z2 = normals[i].z;
						vertices[i].y = 0f - y;
						vertices[i].z = 0f - z;
						normals[i].y = 0f - y2;
						normals[i].z = 0f - z2;
						float x3 = vertices[i].x;
						float y3 = vertices[i].y;
						float x4 = normals[i].x;
						float y4 = normals[i].y;
						vertices[i].x = 0f - x3;
						vertices[i].y = 0f - y3;
						normals[i].x = 0f - x4;
						normals[i].y = 0f - y4;
						vertices[i].x = vertices[i].x * 0.08f;
						vertices[i].x = vertices[i].x - 0.1f;
						vertices[i].z = vertices[i].z + 0.3f;
						vertices[i].y = vertices[i].y + 0.1f;
						ref Vector3 reference30 = ref vertices[i];
						reference30 = vertices[i] + center;
					}
					for (int i = 0; i < triangles.Length; i += 3)
					{
						if (vertices[triangles[i]].x > -0.1f && vertices[triangles[i + 1]].x > -0.1f && vertices[triangles[i + 2]].x > -0.1f)
						{
							int num4 = triangles[i];
							triangles[i] = triangles[i + 2];
							triangles[i + 2] = num4;
						}
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.triangles = triangles;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[10] = mesh;
					dots[10] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.1f, 0f, 0.3f);
				component2.size = new Vector3(0.1f, 1.4f, 1.5f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.1f, 0f, 0.3f);
				__instance.itemProperties.itemName = item[10];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[10];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[10];
				((Renderer)___mainObjectRenderer).materials = cats[10];
				__instance.itemProperties.grabSFX = take[10];
				__instance.itemProperties.dropSFX = give[10];
				break;
			}
			case 11:
			{
				component.mesh = fish[11];
				if (!dots[11])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference10 = ref vertices[i];
						reference10 = vertices[i] - center;
						ref Vector3 reference11 = ref vertices[i];
						reference11 = vertices[i] * 0.06f;
						float y = vertices[i].y;
						float z = vertices[i].z;
						float y2 = normals[i].y;
						float z2 = normals[i].z;
						vertices[i].y = 0f - y;
						vertices[i].z = 0f - z;
						normals[i].y = 0f - y2;
						normals[i].z = 0f - z2;
						float x3 = vertices[i].x;
						float y3 = vertices[i].y;
						float x4 = normals[i].x;
						float y4 = normals[i].y;
						vertices[i].x = y3;
						vertices[i].y = 0f - x3;
						normals[i].x = y4;
						normals[i].y = 0f - x4;
						float y5 = vertices[i].y;
						float z3 = vertices[i].z;
						float y6 = normals[i].y;
						float z4 = normals[i].z;
						vertices[i].y = (float)((double)y5 * Math.Cos(5.497787) - (double)z3 * Math.Sin(5.497787));
						vertices[i].z = (float)((double)y5 * Math.Sin(5.497787) + (double)z3 * Math.Cos(5.497787));
						normals[i].y = (float)((double)y6 * Math.Cos(5.497787) - (double)z4 * Math.Sin(5.497787));
						normals[i].z = (float)((double)y6 * Math.Sin(5.497787) + (double)z4 * Math.Cos(5.497787));
						vertices[i].x = vertices[i].x - 0.1f;
						vertices[i].z = vertices[i].z + 1f;
						vertices[i].y = vertices[i].y + 0.01f;
						ref Vector3 reference12 = ref vertices[i];
						reference12 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[11] = mesh;
					dots[11] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.1f, 0f, 1f);
				component2.size = new Vector3(0.1f, 1.3f, 2.7f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.1f, 0f, 1f);
				__instance.itemProperties.itemName = item[11];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[11];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[11];
				((Renderer)___mainObjectRenderer).materials = cats[11];
				__instance.itemProperties.grabSFX = take[11];
				__instance.itemProperties.dropSFX = give[11];
				break;
			}
			case 12:
			{
				component.mesh = fish[12];
				if (!dots[12])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference37 = ref vertices[i];
						reference37 = vertices[i] - center;
						ref Vector3 reference38 = ref vertices[i];
						reference38 = vertices[i] * 0.06f;
						float y = vertices[i].y;
						float z = vertices[i].z;
						float y2 = normals[i].y;
						float z2 = normals[i].z;
						vertices[i].y = 0f - y;
						vertices[i].z = 0f - z;
						normals[i].y = 0f - y2;
						normals[i].z = 0f - z2;
						float x3 = vertices[i].x;
						float y3 = vertices[i].y;
						float x4 = normals[i].x;
						float y4 = normals[i].y;
						vertices[i].x = y3;
						vertices[i].y = 0f - x3;
						normals[i].x = y4;
						normals[i].y = 0f - x4;
						float y5 = vertices[i].y;
						float z3 = vertices[i].z;
						float y6 = normals[i].y;
						float z4 = normals[i].z;
						vertices[i].y = (float)((double)y5 * Math.Cos(0.7853982) - (double)z3 * Math.Sin(0.7853982));
						vertices[i].z = (float)((double)y5 * Math.Sin(0.7853982) + (double)z3 * Math.Cos(0.7853982));
						normals[i].y = (float)((double)y6 * Math.Cos(0.7853982) - (double)z4 * Math.Sin(0.7853982));
						normals[i].z = (float)((double)y6 * Math.Sin(0.7853982) + (double)z4 * Math.Cos(0.7853982));
						vertices[i].x = vertices[i].x - 0.1f;
						vertices[i].z = vertices[i].z + 0.8f;
						vertices[i].y = vertices[i].y + 0.01f;
						ref Vector3 reference39 = ref vertices[i];
						reference39 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[12] = mesh;
					dots[12] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.1f, 0f, 0.7f);
				component2.size = new Vector3(0.1f, 1.5f, 2f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.1f, 0f, 0.7f);
				__instance.itemProperties.itemName = item[12];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[12];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[12];
				((Renderer)___mainObjectRenderer).materials = cats[12];
				__instance.itemProperties.grabSFX = take[12];
				__instance.itemProperties.dropSFX = give[12];
				break;
			}
			case 13:
			{
				component.mesh = fish[13];
				if (!dots[13])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					int[] triangles = mesh.triangles;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference16 = ref vertices[i];
						reference16 = vertices[i] - center;
						ref Vector3 reference17 = ref vertices[i];
						reference17 = vertices[i] * 0.93f;
						vertices[i].x = vertices[i].x * 0.08f;
						vertices[i].x = vertices[i].x - 0.1f;
						vertices[i].z = vertices[i].z + 0.5f;
						vertices[i].y = vertices[i].y + 0.2f;
						ref Vector3 reference18 = ref vertices[i];
						reference18 = vertices[i] + center;
					}
					for (int i = 0; i < triangles.Length; i += 3)
					{
						if (vertices[triangles[i]].x > -0.1f && vertices[triangles[i + 1]].x > -0.1f && vertices[triangles[i + 2]].x > -0.1f)
						{
							int num4 = triangles[i];
							triangles[i] = triangles[i + 2];
							triangles[i + 2] = num4;
						}
					}
					mesh.vertices = vertices;
					mesh.triangles = triangles;
					mesh.RecalculateBounds();
					fish[13] = mesh;
					dots[13] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.1f, -0.05f, 0.4f);
				component2.size = new Vector3(0.1f, 1.4f, 1.65f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.1f, -0.05f, 0.4f);
				__instance.itemProperties.itemName = item[13];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[13];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[13];
				((Renderer)___mainObjectRenderer).materials = cats[13];
				__instance.itemProperties.grabSFX = take[13];
				__instance.itemProperties.dropSFX = give[13];
				break;
			}
			case 14:
			{
				component.mesh = fish[14];
				if (!dots[14])
				{
					Mesh mesh = component.mesh;
					Vector3[] vertices = mesh.vertices;
					Vector3[] normals = mesh.normals;
					bounds = mesh.bounds;
					Vector3 center = ((Bounds)(ref bounds)).center;
					for (int i = 0; i < vertices.Length; i++)
					{
						ref Vector3 reference = ref vertices[i];
						reference = vertices[i] - center;
						ref Vector3 reference2 = ref vertices[i];
						reference2 = vertices[i] * 1f;
						float y = vertices[i].y;
						float z = vertices[i].z;
						float y2 = normals[i].y;
						float z2 = normals[i].z;
						vertices[i].y = 0f - z;
						vertices[i].z = y;
						normals[i].y = 0f - z2;
						normals[i].z = y2;
						vertices[i].x = vertices[i].x - 0.1f;
						vertices[i].z = vertices[i].z + 0.3f;
						ref Vector3 reference3 = ref vertices[i];
						reference3 = vertices[i] + center;
					}
					mesh.vertices = vertices;
					mesh.normals = normals;
					mesh.RecalculateBounds();
					mesh.RecalculateNormals();
					fish[14] = mesh;
					dots[14] = true;
				}
				BoxCollider component2 = ((Component)___mainObjectRenderer).GetComponent<BoxCollider>();
				component2.center = new Vector3(-0.1f, 0f, 0.3f);
				component2.size = new Vector3(0.25f, 0.25f, 1.25f);
				((Component)((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>()).transform.localPosition = new Vector3(-0.1f, 0f, 0.3f);
				__instance.itemProperties.itemName = item[14];
				((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[14];
				__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[14];
				((Renderer)___mainObjectRenderer).materials = cats[14];
				__instance.itemProperties.grabSFX = take[14];
				__instance.itemProperties.dropSFX = give[14];
				break;
			}
			default:
				yon.mls.LogInfo((object)"?");
				break;
			}
		}
		else
		{
			component.mesh = fish[0];
			__instance.itemProperties.itemName = item[0];
			((Component)___mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText = item[0];
			__instance.itemProperties.spawnPrefab.GetComponent<MeshFilter>().mesh = fish[0];
			((Renderer)___mainObjectRenderer).materials = cats[0];
			__instance.itemProperties.grabSFX = take[0];
			__instance.itemProperties.dropSFX = give[0];
		}
	}

	[HarmonyPatch("PlayDropSFX")]
	private static void Prefix(ref GrabbableObject __instance)
	{
		if (item[0] == null || !((Object)(object)__instance != (Object)null) || !((Object)(object)__instance.mainObjectRenderer != (Object)null) || !((Object)(object)((Component)__instance.mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>() != (Object)null) || !(((Object)__instance.itemProperties).name == "MagnifyingGlass"))
		{
			return;
		}
		for (int i = 0; i < item.Length; i++)
		{
			if (((Component)__instance.mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText == item[i])
			{
				__instance.itemProperties.dropSFX = give[i];
				break;
			}
		}
	}
}
[HarmonyPatch(typeof(PlayerControllerB))]
internal class pcb
{
	[HarmonyPatch("BeginGrabObject")]
	private static void Postfix(ref GrabbableObject ___currentlyGrabbingObject)
	{
		if (go.item[0] == null || !((Object)(object)___currentlyGrabbingObject != (Object)null) || !((Object)(object)___currentlyGrabbingObject.mainObjectRenderer != (Object)null) || !((Object)(object)((Component)___currentlyGrabbingObject.mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>() != (Object)null) || !(((Object)___currentlyGrabbingObject.itemProperties).name == "MagnifyingGlass"))
		{
			return;
		}
		for (int i = 0; i < go.item.Length; i++)
		{
			if (((Component)___currentlyGrabbingObject.mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText == go.item[i])
			{
				___currentlyGrabbingObject.itemProperties.grabSFX = go.take[i];
				___currentlyGrabbingObject.itemProperties.itemName = ((Component)___currentlyGrabbingObject.mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText;
				break;
			}
		}
	}

	[HarmonyPatch("ScrollMouse_performed")]
	private static void Prefix(ref CallbackContext context, ref int ___currentItemSlot, ref GrabbableObject[] ___ItemSlots)
	{
		if (go.item[0] == null)
		{
			return;
		}
		bool flag = false;
		if (((CallbackContext)(ref context)).ReadValue<float>() > 0f)
		{
			flag = true;
		}
		int num = ___currentItemSlot - 1;
		if (flag)
		{
			num = (___currentItemSlot + 1) % ___ItemSlots.Length;
		}
		else if (___currentItemSlot == 0)
		{
			num = ___ItemSlots.Length - 1;
		}
		if (num < 0 || num >= ___ItemSlots.Length || !((Object)(object)___ItemSlots[num] != (Object)null) || !((Object)(object)___ItemSlots[num].mainObjectRenderer != (Object)null) || !((Object)(object)((Component)___ItemSlots[num].mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>() != (Object)null) || !(((Object)___ItemSlots[num].itemProperties).name == "MagnifyingGlass"))
		{
			return;
		}
		for (int i = 0; i < go.item.Length; i++)
		{
			if (((Component)___ItemSlots[num].mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText == go.item[i])
			{
				___ItemSlots[num].itemProperties.grabSFX = go.take[i];
				___ItemSlots[num].itemProperties.itemName = ((Component)___ItemSlots[num].mainObjectRenderer).GetComponentInChildren<ScanNodeProperties>().headerText;
				break;
			}
		}
	}
}
[HarmonyPatch(typeof(HUDManager))]
internal class hm
{
	[HarmonyPrefix]
	[HarmonyPatch("DisplayNewScrapFound")]
	private static void Prefix1(ref List<GrabbableObject> ___itemsToBeDisplayed)
	{
		if (go.item[0] != null && (Object)(object)___itemsToBeDisplayed[0] != (Object)null && ((Object)___itemsToBeDisplayed[0].itemProperties).name == "MagnifyingGlass" && (Object)(object)((Component)___itemsToBeDisplayed[0]).GetComponentInChildren<ScanNodeProperties>() != (Object)null)
		{
			___itemsToBeDisplayed[0].itemProperties.itemName = (___itemsToBeDisplayed[0].itemProperties.spawnPrefab.GetComponentInChildren<ScanNodeProperties>().headerText = ((Component)___itemsToBeDisplayed[0]).GetComponentInChildren<ScanNodeProperties>().headerText);
		}
	}

	[HarmonyPatch("displayScrapTimer")]
	[HarmonyPrefix]
	private static void Prefix2(ref GameObject displayingObject)
	{
		if (go.item[0] == null || !(((Object)displayingObject).name == "MagnifyingGlass(Clone)") || !((Object)(object)displayingObject.GetComponentInChildren<ScanNodeProperties>() != (Object)null))
		{
			return;
		}
		for (int i = 0; i < go.item.Length; i++)
		{
			if (displayingObject.GetComponentInChildren<ScanNodeProperties>().headerText == go.item[i])
			{
				displayingObject.GetComponent<MeshFilter>().mesh = go.fish[i];
				break;
			}
		}
	}
}
internal class fish1
{
	public static Mesh fish2(Mesh nonReadableMesh)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		Mesh val = new Mesh();
		val.indexFormat = nonReadableMesh.indexFormat;
		GraphicsBuffer vertexBuffer = nonReadableMesh.GetVertexBuffer(0);
		int num = vertexBuffer.stride * vertexBuffer.count;
		byte[] array = new byte[num];
		vertexBuffer.GetData((Array)array);
		val.SetVertexBufferParams(nonReadableMesh.vertexCount, nonReadableMesh.GetVertexAttributes());
		val.SetVertexBufferData<byte>(array, 0, 0, num, 0, (MeshUpdateFlags)0);
		vertexBuffer.Release();
		val.subMeshCount = nonReadableMesh.subMeshCount;
		GraphicsBuffer indexBuffer = nonReadableMesh.GetIndexBuffer();
		int num2 = indexBuffer.stride * indexBuffer.count;
		byte[] array2 = new byte[num2];
		indexBuffer.GetData((Array)array2);
		val.SetIndexBufferParams(indexBuffer.count, nonReadableMesh.indexFormat);
		val.SetIndexBufferData<byte>(array2, 0, 0, num2, (MeshUpdateFlags)0);
		indexBuffer.Release();
		uint num3 = 0u;
		for (int i = 0; i < val.subMeshCount; i++)
		{
			uint indexCount = nonReadableMesh.GetIndexCount(i);
			val.SetSubMesh(i, new SubMeshDescriptor((int)num3, (int)indexCount, (MeshTopology)0), (MeshUpdateFlags)0);
			num3 += indexCount;
		}
		val.RecalculateNormals();
		val.RecalculateBounds();
		return val;
	}
}