From 22f0cc59a2d3bc7900764e3916c670075ff9d35e Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 3 Nov 2024 01:24:24 +0100 Subject: 1.21.3 WIP --- .../kotlin/events/RegisterCustomShadersEvent.kt | 24 ---------------------- 1 file changed, 24 deletions(-) delete mode 100644 src/main/kotlin/events/RegisterCustomShadersEvent.kt (limited to 'src/main/kotlin/events/RegisterCustomShadersEvent.kt') diff --git a/src/main/kotlin/events/RegisterCustomShadersEvent.kt b/src/main/kotlin/events/RegisterCustomShadersEvent.kt deleted file mode 100644 index 2f6d1f8..0000000 --- a/src/main/kotlin/events/RegisterCustomShadersEvent.kt +++ /dev/null @@ -1,24 +0,0 @@ -package moe.nea.firmament.events - -import com.mojang.datafixers.util.Pair -import java.util.function.Consumer -import net.minecraft.client.gl.ShaderProgram -import net.minecraft.client.render.VertexFormat -import net.minecraft.resource.ResourceFactory -import moe.nea.firmament.Firmament - -data class RegisterCustomShadersEvent( - val list: MutableList>>, - val resourceFactory: ResourceFactory, -) : FirmamentEvent() { - companion object : FirmamentEventBus() - - fun register(name: String, vertexFormat: VertexFormat, saver: Consumer) { - require(name.startsWith("firmament_")) - try { - list.add(Pair.of(ShaderProgram(resourceFactory, name, vertexFormat), saver)) - } catch (ex: Exception) { - Firmament.logger.fatal("Could not load firmament shader $name", ex) - } - } -} -- cgit