using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("")]
[assembly: AssemblyCompany("Script")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Minecraft")]
[assembly: AssemblyTitle("Minecraft")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
public class LavaCull : MonoBehaviour
{
[Range(0f, 5f)]
public float rangeMultiplier = 1f;
internal Renderer lavaRenderer;
internal bool isCulled;
private void Awake()
{
lavaRenderer = ((Component)this).GetComponentInChildren<Renderer>();
LavaCullingManager.Register(this);
}
private void OnDestroy()
{
LavaCullingManager.Unregister(this);
}
internal void SetVisible(bool visible)
{
if (!((Object)(object)lavaRenderer == (Object)null) && lavaRenderer.enabled != visible)
{
lavaRenderer.enabled = visible;
isCulled = !visible;
}
}
}
public class LavaCullingManager : MonoBehaviour
{
private static LavaCullingManager instance;
private static readonly List<LavaCull> surfaces = new List<LavaCull>();
private Transform target;
private Vector3 lastCheckPos;
private float lastYRotation;
private float logicTimer;
private const float LOGIC_INTERVAL = 0.5f;
private const float MOVE_THRESHOLD = 5f;
private const float ROT_THRESHOLD = 20f;
public static void Register(LavaCull s)
{
EnsureInstance();
if (!surfaces.Contains(s))
{
surfaces.Add(s);
}
}
public static void Unregister(LavaCull s)
{
surfaces.Remove(s);
}
private static void EnsureInstance()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
if (!((Object)(object)instance != (Object)null))
{
GameObject val = new GameObject("LavaCullingManager_Internal");
((Object)val).hideFlags = (HideFlags)61;
instance = val.AddComponent<LavaCullingManager>();
Object.DontDestroyOnLoad((Object)(object)val);
}
}
private void Update()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Invalid comparison between Unknown and I4
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
if ((int)GameDirector.instance.currentState == 2 && Object.op_Implicit((Object)(object)PlayerAvatar.instance) && LevelGenerator.Instance.Generated)
{
if (!Object.op_Implicit((Object)(object)target))
{
target = ((Component)PlayerAvatar.instance).transform;
lastCheckPos = target.position;
lastYRotation = target.eulerAngles.y;
ForceUpdate();
}
LogicUpdate();
}
}
private void LogicUpdate()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
logicTimer -= Time.deltaTime;
bool flag = Vector3.Distance(lastCheckPos, target.position) >= 5f;
bool flag2 = Mathf.Abs(target.eulerAngles.y - lastYRotation) >= 20f;
if (logicTimer <= 0f || flag || flag2)
{
logicTimer = 0.5f;
lastCheckPos = target.position;
lastYRotation = target.eulerAngles.y;
UpdateSurfaces();
}
}
private void ForceUpdate()
{
UpdateSurfaces();
}
private void UpdateSurfaces()
{
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
float lightDistance = GraphicsManager.instance.lightDistance;
for (int num = surfaces.Count - 1; num >= 0; num--)
{
LavaCull lavaCull = surfaces[num];
if (!Object.op_Implicit((Object)(object)lavaCull))
{
surfaces.RemoveAt(num);
}
else
{
float num2 = lightDistance * lavaCull.rangeMultiplier;
float num3 = num2 * num2;
Vector3 val = ((Component)lavaCull).transform.position - target.position;
bool visible = ((Vector3)(ref val)).sqrMagnitude < num3;
lavaCull.SetVisible(visible);
}
}
}
}
public class MCBridge : MonoBehaviourPun
{
private class RuntimeBridgeData
{
public Transform floor;
public AudioSource source;
public AudioClip clip;
public Transform[] points;
}
[CompilerGenerated]
private sealed class <FullSequenceRoutine>d__50 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public MCBridge <>4__this;
private int <maxPoints>5__1;
private int <i>5__2;
private int <i>5__3;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <FullSequenceRoutine>d__50(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>4__this.isSequenceActive = true;
<maxPoints>5__1 = 7;
<i>5__2 = 0;
goto IL_0097;
case 1:
<>1__state = -1;
<i>5__2++;
goto IL_0097;
case 2:
<>1__state = -1;
<i>5__3 = <maxPoints>5__1 - 2;
break;
case 3:
{
<>1__state = -1;
<i>5__3--;
break;
}
IL_0097:
if (<i>5__2 < <maxPoints>5__1)
{
<>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PerformJumpStep(<i>5__2));
<>1__state = 1;
return true;
}
<>2__current = (object)new WaitForSeconds(<>4__this.timeBeforeReturn);
<>1__state = 2;
return true;
}
if (<i>5__3 >= 0)
{
<>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PerformJumpStep(<i>5__3));
<>1__state = 3;
return true;
}
<>4__this.isSequenceActive = false;
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <PerformJumpStep>d__51 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public int targetPointIndex;
public MCBridge <>4__this;
private RuntimeBridgeData[] <>s__1;
private int <>s__2;
private RuntimeBridgeData <bridge>5__3;
private RuntimeBridgeData[] <>s__4;
private int <>s__5;
private RuntimeBridgeData <bridge>5__6;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <PerformJumpStep>d__51(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>s__1 = null;
<bridge>5__3 = null;
<>s__4 = null;
<bridge>5__6 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Expected O, but got Unknown
//IL_020e: Unknown result type (might be due to invalid IL or missing references)
//IL_0218: Expected O, but got Unknown
//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>s__1 = <>4__this.runtimeBridges;
for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++)
{
<bridge>5__3 = <>s__1[<>s__2];
if (<bridge>5__3 != null && (Object)(object)<bridge>5__3.source != (Object)null && (Object)(object)<bridge>5__3.clip != (Object)null)
{
<bridge>5__3.source.PlayOneShot(<bridge>5__3.clip);
}
<bridge>5__3 = null;
}
<>s__1 = null;
<>2__current = (object)new WaitForSeconds(<>4__this.preJumpSoundDelay);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<>s__4 = <>4__this.runtimeBridges;
for (<>s__5 = 0; <>s__5 < <>s__4.Length; <>s__5++)
{
<bridge>5__6 = <>s__4[<>s__5];
if (<bridge>5__6 != null && (Object)(object)<bridge>5__6.floor != (Object)null && <bridge>5__6.points != null && targetPointIndex >= 0 && targetPointIndex < <bridge>5__6.points.Length && (Object)(object)<bridge>5__6.points[targetPointIndex] != (Object)null)
{
<bridge>5__6.floor.position = <bridge>5__6.points[targetPointIndex].position;
}
<bridge>5__6 = null;
}
<>s__4 = null;
<>2__current = (object)new WaitForSeconds(<>4__this.delayBetweenPoints);
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[Header("--- Timers ---")]
public float delayBetweenPoints = 0.8f;
public float preJumpSoundDelay = 0.2f;
public float timeBeforeReturn = 20f;
[Header("--- BRIDGE 1 SETUP ---")]
public Transform b1_FloorObject;
public AudioSource b1_AudioSource;
public AudioClip b1_JumpSound;
[Space(5f)]
public Transform b1_Point1;
public Transform b1_Point2;
public Transform b1_Point3;
public Transform b1_Point4;
public Transform b1_Point5;
public Transform b1_Point6;
public Transform b1_Point7;
[Header("--- BRIDGE 2 SETUP ---")]
public Transform b2_FloorObject;
public AudioSource b2_AudioSource;
public AudioClip b2_JumpSound;
[Space(5f)]
public Transform b2_Point1;
public Transform b2_Point2;
public Transform b2_Point3;
public Transform b2_Point4;
public Transform b2_Point5;
public Transform b2_Point6;
public Transform b2_Point7;
[Header("--- BRIDGE 3 SETUP ---")]
public Transform b3_FloorObject;
public AudioSource b3_AudioSource;
public AudioClip b3_JumpSound;
[Space(5f)]
public Transform b3_Point1;
public Transform b3_Point2;
public Transform b3_Point3;
public Transform b3_Point4;
public Transform b3_Point5;
public Transform b3_Point6;
public Transform b3_Point7;
[Header("--- BRIDGE 4 SETUP ---")]
public Transform b4_FloorObject;
public AudioSource b4_AudioSource;
public AudioClip b4_JumpSound;
[Space(5f)]
public Transform b4_Point1;
public Transform b4_Point2;
public Transform b4_Point3;
public Transform b4_Point4;
public Transform b4_Point5;
public Transform b4_Point6;
public Transform b4_Point7;
private RuntimeBridgeData[] runtimeBridges;
private bool isSequenceActive = false;
private const int TOTAL_POINTS = 7;
private void Start()
{
runtimeBridges = new RuntimeBridgeData[4];
runtimeBridges[0] = new RuntimeBridgeData
{
floor = b1_FloorObject,
source = b1_AudioSource,
clip = b1_JumpSound,
points = (Transform[])(object)new Transform[7] { b1_Point1, b1_Point2, b1_Point3, b1_Point4, b1_Point5, b1_Point6, b1_Point7 }
};
runtimeBridges[1] = new RuntimeBridgeData
{
floor = b2_FloorObject,
source = b2_AudioSource,
clip = b2_JumpSound,
points = (Transform[])(object)new Transform[7] { b2_Point1, b2_Point2, b2_Point3, b2_Point4, b2_Point5, b2_Point6, b2_Point7 }
};
runtimeBridges[2] = new RuntimeBridgeData
{
floor = b3_FloorObject,
source = b3_AudioSource,
clip = b3_JumpSound,
points = (Transform[])(object)new Transform[7] { b3_Point1, b3_Point2, b3_Point3, b3_Point4, b3_Point5, b3_Point6, b3_Point7 }
};
runtimeBridges[3] = new RuntimeBridgeData
{
floor = b4_FloorObject,
source = b4_AudioSource,
clip = b4_JumpSound,
points = (Transform[])(object)new Transform[7] { b4_Point1, b4_Point2, b4_Point3, b4_Point4, b4_Point5, b4_Point6, b4_Point7 }
};
}
public void StartSequence()
{
if (!isSequenceActive)
{
if (PhotonNetwork.IsConnected && PhotonNetwork.InRoom)
{
((MonoBehaviourPun)this).photonView.RPC("RPC_StartSequence", (RpcTarget)0, Array.Empty<object>());
}
else
{
RPC_StartSequence();
}
}
}
[PunRPC]
private void RPC_StartSequence()
{
if (!isSequenceActive)
{
((MonoBehaviour)this).StartCoroutine(FullSequenceRoutine());
}
}
[IteratorStateMachine(typeof(<FullSequenceRoutine>d__50))]
private IEnumerator FullSequenceRoutine()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <FullSequenceRoutine>d__50(0)
{
<>4__this = this
};
}
[IteratorStateMachine(typeof(<PerformJumpStep>d__51))]
private IEnumerator PerformJumpStep(int targetPointIndex)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <PerformJumpStep>d__51(0)
{
<>4__this = this,
targetPointIndex = targetPointIndex
};
}
}
public class MCColliderView : MonoBehaviour
{
public enum GizmoColor
{
Red,
Green,
Blue,
Yellow,
Magenta,
Cyan,
Orange,
White,
Black
}
[SerializeField]
private GizmoColor gizmoColor = GizmoColor.Blue;
private void OnDrawGizmos()
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
BoxCollider component = ((Component)this).GetComponent<BoxCollider>();
if (Object.op_Implicit((Object)(object)component))
{
GetColors(out var wire, out var fill);
Gizmos.matrix = ((Component)this).transform.localToWorldMatrix;
Gizmos.color = wire;
Gizmos.DrawWireCube(component.center, component.size);
Gizmos.color = fill;
Gizmos.DrawCube(component.center, component.size);
}
}
private void GetColors(out Color wire, out Color fill)
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0179: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0204: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0228: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Unknown result type (might be due to invalid IL or missing references)
//IL_0247: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Unknown result type (might be due to invalid IL or missing references)
//IL_0268: Unknown result type (might be due to invalid IL or missing references)
//IL_0282: Unknown result type (might be due to invalid IL or missing references)
//IL_0287: Unknown result type (might be due to invalid IL or missing references)
//IL_028f: Unknown result type (might be due to invalid IL or missing references)
//IL_0294: Unknown result type (might be due to invalid IL or missing references)
//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
switch (gizmoColor)
{
case GizmoColor.Red:
wire = new Color(1f, 0f, 0f, 1f);
fill = new Color(1f, 0f, 0f, 0.2f);
break;
case GizmoColor.Green:
wire = new Color(0f, 1f, 0f, 1f);
fill = new Color(0f, 1f, 0f, 0.2f);
break;
case GizmoColor.Blue:
wire = new Color(0f, 0.4f, 1f, 1f);
fill = new Color(0f, 0.4f, 1f, 0.2f);
break;
case GizmoColor.Yellow:
wire = new Color(1f, 1f, 0f, 1f);
fill = new Color(1f, 1f, 0f, 0.2f);
break;
case GizmoColor.Magenta:
wire = new Color(1f, 0f, 1f, 1f);
fill = new Color(1f, 0f, 1f, 0.2f);
break;
case GizmoColor.Cyan:
wire = new Color(0f, 1f, 1f, 1f);
fill = new Color(0f, 1f, 1f, 0.2f);
break;
case GizmoColor.Orange:
wire = new Color(1f, 0.5f, 0f, 1f);
fill = new Color(1f, 0.5f, 0f, 0.2f);
break;
case GizmoColor.White:
wire = new Color(1f, 1f, 1f, 1f);
fill = new Color(1f, 1f, 1f, 0.15f);
break;
case GizmoColor.Black:
wire = new Color(0f, 0f, 0f, 1f);
fill = new Color(0f, 0f, 0f, 0.15f);
break;
default:
wire = Color.blue;
fill = new Color(0f, 0f, 1f, 0.2f);
break;
}
}
}
public class MCLevelPointVisualizer : MonoBehaviour
{
private LevelPoint[] levelPoints;
private BoxCollider levelPointTrigger;
private Vector3 offset = new Vector3(0.1f, 0f, 0.1f);
private void OnDrawGizmos()
{
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_018d: Unknown result type (might be due to invalid IL or missing references)
//IL_0199: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_014a: Unknown result type (might be due to invalid IL or missing references)
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_0161: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_016c: Unknown result type (might be due to invalid IL or missing references)
levelPoints = ((Component)this).GetComponentsInChildren<LevelPoint>();
if (levelPoints == null || levelPoints.Length == 0)
{
return;
}
LevelPoint[] array = levelPoints;
LevelPoint[] array2 = array;
foreach (LevelPoint val in array2)
{
levelPointTrigger = ((Component)val).gameObject.GetComponent<BoxCollider>();
if (val.ModuleConnect)
{
Gizmos.color = Color.yellow;
}
else
{
Gizmos.color = Color.green;
}
Gizmos.DrawCube(((Component)val).transform.position + levelPointTrigger.center, levelPointTrigger.size);
if (val.ConnectedPoints == null || levelPoints.Length == 0)
{
continue;
}
foreach (LevelPoint connectedPoint in val.ConnectedPoints)
{
List<LevelPoint> connectedPoints = connectedPoint.ConnectedPoints;
if (connectedPoints.Contains(val))
{
Gizmos.color = Color.green;
Gizmos.DrawLine(((Component)connectedPoint).transform.position + offset, ((Component)val).transform.position + offset);
Gizmos.DrawLine(((Component)val).transform.position - offset, ((Component)connectedPoint).transform.position - offset);
}
else
{
Gizmos.color = Color.red;
Gizmos.DrawLine(((Component)connectedPoint).transform.position, ((Component)val).transform.position);
}
}
}
}
}
[BepInPlugin("com.Minecraft.cave", "Minecraft Cave", "1.0.0")]
public class MCModuleSize : BaseUnityPlugin
{
private bool MinecraftActive = false;
private float previousModuleWidth = 0f;
private bool previousSaved = false;
private void Awake()
{
SceneManager.sceneLoaded += OnSceneLoaded;
SceneManager.sceneUnloaded += OnSceneUnloaded;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Minecraft Cave mod loaded.");
}
private void OnDestroy()
{
SceneManager.sceneLoaded -= OnSceneLoaded;
SceneManager.sceneUnloaded -= OnSceneUnloaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
if (((Scene)(ref scene)).name != "Main")
{
return;
}
try
{
Level val = RunManager.instance?.levelCurrent;
if ((Object)(object)val == (Object)null)
{
return;
}
string name = ((Object)val).name;
if (name == "Level - Minecraft Cave")
{
if (!previousSaved)
{
previousModuleWidth = LevelGenerator.ModuleWidth;
previousSaved = true;
}
LevelGenerator.ModuleWidth = 5f;
MinecraftActive = true;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Minecraft Cave detected — ModuleWidth set to 5.");
}
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogError((object)$"Module size error (OnSceneLoaded): {arg}");
}
}
private void OnSceneUnloaded(Scene unloadedScene)
{
if (!MinecraftActive || ((Scene)(ref unloadedScene)).name != "Main")
{
return;
}
try
{
if (previousSaved)
{
LevelGenerator.ModuleWidth = previousModuleWidth;
previousSaved = false;
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Left Minecraft Cave — ModuleWidth restored to {previousModuleWidth}.");
}
MinecraftActive = false;
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogError((object)$"Module size error (OnSceneUnloaded): {arg}");
}
}
}
public class MCValuableVisualizer : MonoBehaviour
{
private void OnDrawGizmos()
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
BoxCollider component = ((Component)this).GetComponent<BoxCollider>();
Gizmos.color = new Color(1f, 1.18f, 0f, 6f);
Gizmos.matrix = ((Component)this).transform.localToWorldMatrix;
Gizmos.DrawWireCube(component.center, component.size);
Gizmos.color = new Color(1f, 1.18f, 0f, 0.2f);
Gizmos.DrawCube(component.center, component.size);
Gizmos.color = Color.white;
Gizmos.matrix = Matrix4x4.identity;
Bounds bounds = ((Collider)component).bounds;
Vector3 center = ((Bounds)(ref bounds)).center;
Vector3 val = center + ((Component)this).transform.forward * 0.5f;
Gizmos.DrawLine(center, val);
Gizmos.DrawLine(val, val + Vector3.LerpUnclamped(-((Component)this).transform.forward, -((Component)this).transform.right, 0.5f) * 0.25f);
Gizmos.DrawLine(val, val + Vector3.LerpUnclamped(-((Component)this).transform.forward, ((Component)this).transform.right, 0.5f) * 0.25f);
}
}
namespace Minecraft
{
[BepInPlugin("Script.Minecraft.Cave", "Minecraft Cave", "1.0")]
public class Minecraft : BaseUnityPlugin
{
internal static Minecraft Instance { get; private set; }
internal static ManualLogSource Logger => Instance._logger;
private ManualLogSource _logger => ((BaseUnityPlugin)this).Logger;
internal Harmony? Harmony { get; set; }
private void Awake()
{
Instance = this;
((Component)this).gameObject.transform.parent = null;
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
Patch();
Logger.LogInfo((object)$"{((BaseUnityPlugin)this).Info.Metadata.GUID} v{((BaseUnityPlugin)this).Info.Metadata.Version} has loaded!");
}
internal void Patch()
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Expected O, but got Unknown
//IL_0026: Expected O, but got Unknown
if (Harmony == null)
{
Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID);
Harmony val2 = val;
Harmony = val;
}
Harmony.PatchAll();
}
internal void Unpatch()
{
Harmony? harmony = Harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
private void Update()
{
}
}
}