This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.allxrise.mod.allxrisemod; | |
import net.allxrise.mod.allxrisemod.blocks.lucky_block; | |
import net.allxrise.mod.allxrisemod.blocks.radioactive_block; | |
import net.allxrise.mod.allxrisemod.items.CreperHearthItem; | |
import net.fabricmc.api.ModInitializer; | |
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; | |
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; | |
import net.fabricmc.fabric.api.renderer.v1.RendererAccess; | |
import net.minecraft.block.Blocks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public abstract class StaticInstance<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
public static T Instance { get; private set; } | |
protected virtual void Awake() => Instance = this as T; | |
protected void OnApplicationQuit() | |
{ | |
Instance = null; |