Minecraft world importer for Gamecraft.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1KB

  1. using System.Reflection;
  2. using GamecraftModdingAPI.Utility;
  3. using HarmonyLib;
  4. using IllusionPlugin;
  5. using UnityEngine;
  6. namespace GCMC
  7. {
  8. public class GCMCPlugin : IPlugin
  9. {
  10. public string Name { get; } = "GCMC";
  11. public string Version { get; } = "v0.0.1";
  12. public static Harmony harmony { get; protected set; }
  13. public const string HarmonyID = "io.github.norbipeti.GCMC";
  14. public void OnApplicationStart()
  15. {
  16. /*if (harmony == null)
  17. {
  18. harmony = new Harmony(HarmonyID);
  19. harmony.PatchAll(Assembly.GetExecutingAssembly());
  20. }*/
  21. GameEngineManager.AddGameEngine(new CubePlacerEngine());
  22. Debug.Log("GCMC loaded");
  23. }
  24. public void OnApplicationQuit()
  25. {
  26. harmony?.UnpatchAll(HarmonyID);
  27. }
  28. public void OnLevelWasLoaded(int level)
  29. {
  30. }
  31. public void OnLevelWasInitialized(int level)
  32. {
  33. }
  34. public void OnUpdate()
  35. {
  36. }
  37. public void OnFixedUpdate()
  38. {
  39. }
  40. }
  41. }