Skip to content

Instantly share code, notes, and snippets.

View allxrise's full-sized avatar

İsmail Umut Kasapoğlu allxrise

  • Turkey
  • 02:37 (UTC +03:00)
View GitHub Profile
@allxrise
allxrise / Singleton.cs
Created August 14, 2022 00:36
Singleton utility file for Unity from Tarodev ( https://www.youtube.com/watch?v=tE1qH8OxO2Y&t=229s )
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;
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;