From 3be33bb522f468b812bb59b7f2edc8d1ca352661 Mon Sep 17 00:00:00 2001 From: nea Date: Wed, 3 May 2023 00:52:37 +0200 Subject: Modernize and 1.19.4ify --- src/main/kotlin/moe/nea/notenoughupdates/util/SBData.kt | 15 +-------------- .../kotlin/moe/nea/notenoughupdates/util/render/block.kt | 4 +--- 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'src/main/kotlin/moe/nea/notenoughupdates/util') diff --git a/src/main/kotlin/moe/nea/notenoughupdates/util/SBData.kt b/src/main/kotlin/moe/nea/notenoughupdates/util/SBData.kt index 5aad7fc..6d4af7e 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/util/SBData.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/util/SBData.kt @@ -1,14 +1,11 @@ package moe.nea.notenoughupdates.util -import java.time.Instant import kotlinx.serialization.SerializationException import kotlinx.serialization.decodeFromString import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds import kotlin.time.ExperimentalTime import kotlin.time.TimeSource -import net.minecraft.network.message.ArgumentSignatureDataMap -import net.minecraft.network.packet.c2s.play.CommandExecutionC2SPacket import moe.nea.notenoughupdates.NotEnoughUpdates import moe.nea.notenoughupdates.events.ServerChatLineReceivedEvent import moe.nea.notenoughupdates.events.SkyblockServerUpdateEvent @@ -62,17 +59,7 @@ object SBData { fun sendLocraw() { lastLocrawSent = TimeSource.Monotonic.markNow() val nh = MC.player?.networkHandler ?: return - val ack = nh.consumeAcknowledgment() - nh.sendPacket( - CommandExecutionC2SPacket( - "locraw", - Instant.now(), - 0L, - ArgumentSignatureDataMap.EMPTY, - false, - ack - ) - ) +nh.sendChatCommand("locraw") } diff --git a/src/main/kotlin/moe/nea/notenoughupdates/util/render/block.kt b/src/main/kotlin/moe/nea/notenoughupdates/util/render/block.kt index 9b5432a..9a02996 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/util/render/block.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/util/render/block.kt @@ -22,7 +22,7 @@ class RenderBlockContext(val tesselator: Tessellator, val camPos: Vec3d) { matrixStack.push() matrixStack.translate(blockPos.x - camPos.x, blockPos.y - camPos.y, blockPos.z - camPos.z) RenderSystem.applyModelViewMatrix() - RenderSystem.setShader(GameRenderer::getPositionColorShader) + RenderSystem.setShader(GameRenderer::getPositionColorProgram) buildCube(buffer) tesselator.draw() matrixStack.pop() @@ -73,7 +73,6 @@ class RenderBlockContext(val tesselator: Tessellator, val camPos: Vec3d) { fun renderBlocks(camera: Camera, block: RenderBlockContext. () -> Unit) { RenderSystem.disableDepthTest() - RenderSystem.disableTexture() RenderSystem.enableBlend() RenderSystem.defaultBlendFunc() @@ -82,7 +81,6 @@ class RenderBlockContext(val tesselator: Tessellator, val camPos: Vec3d) { VertexBuffer.unbind() RenderSystem.enableDepthTest() - RenderSystem.enableTexture() RenderSystem.disableBlend() } } -- cgit