Patch_SpawnBlock_Awake.cs 474 B

1234567891011121314151617181920212223
  1. using GadgetCore.API;
  2. using GadgetCore.Util;
  3. using HarmonyLib;
  4. using System.Collections;
  5. using UnityEngine;
  6. namespace MultiplayerClientSpawn.Patches
  7. {
  8. [HarmonyPatch(typeof(SpawnBlock))]
  9. [HarmonyPatch("Awake")]
  10. [HarmonyGadget("MultiplayerClientSpawn")]
  11. public static class Patch_SpawnBlock_Awake
  12. {
  13. [HarmonyPostfix]
  14. public static bool Prefix(SpawnBlock __instance)
  15. {
  16. if (!Network.isServer)
  17. return false;
  18. return true;
  19. }
  20. }
  21. }