Skip to content

Instantly share code, notes, and snippets.

View Max094Reikeb's full-sized avatar

Max094Reikeb

View GitHub Profile
@Max094Reikeb
Max094Reikeb / DimensionSky.java
Created March 29, 2021 09:01
This is a Gist with Minecraft code snippets.
@Mod.EventBusSubscriber(modid = "mod_custom_sky", bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class MoonDimensionSky {
public static Field field_239208_a_ = ObfuscationReflectionHelper.findField(DimensionRenderInfo.class, "field_239208_a_");
public static Field skyVBO = ObfuscationReflectionHelper.findField(WorldRenderer.class, "skyVBO");
public static Field skyVertexFormat = ObfuscationReflectionHelper.findField(WorldRenderer.class, "skyVertexFormat");
public static Field starVBO = ObfuscationReflectionHelper.findField(WorldRenderer.class, "starVBO");
public static Field sky2VBO = ObfuscationReflectionHelper.findField(WorldRenderer.class, "sky2VBO");
private static final ResourceLocation DIM_RENDER_INFO = new ResourceLocation("mod_custom_sky", "moon");
private static final ResourceLocation SUN_TEXTURES = new ResourceLocation("mod_custom_sky", "textures/sun.png");
private static final ResourceLocation MOON_PHASES_TEXTURES = new ResourceLocation("mod_custom_sky", "textures/earth.p
import Charts
import SwiftData
import SwiftUI
struct MainCategoryChart: View {
@AppStorage("preferedCurrencyCode") private var preferedCurrencyCode = Currency.preview.first!.code
@Query private var subscriptions: [Subscription]
@Query private var categories: [Category]
@Max094Reikeb
Max094Reikeb / SubscriptionView.swift
Created April 13, 2024 19:41
View to create/modify a subscription
import SwiftData
import SwiftUI
struct SubscriptionView: View {
@Environment(\.dismiss) var dismiss
@Environment(\.colorScheme) var colorScheme
@Environment(\.modelContext) private var modelContext
@Query private var subscriptions: [Subscription]
@Query private var categories: [Category]