diff options
author | nea <nea@nea.moe> | 2023-05-03 00:52:37 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-03 00:52:49 +0200 |
commit | 3be33bb522f468b812bb59b7f2edc8d1ca352661 (patch) | |
tree | 1292a52cb661ab71584b1ae248204e18b869afe1 /src/main/kotlin/moe/nea/notenoughupdates/util | |
parent | a8ab8f3d6326211f6e07694c64ebd8b6ba195988 (diff) | |
download | firmament-3be33bb522f468b812bb59b7f2edc8d1ca352661.tar.gz firmament-3be33bb522f468b812bb59b7f2edc8d1ca352661.tar.bz2 firmament-3be33bb522f468b812bb59b7f2edc8d1ca352661.zip |
Modernize and 1.19.4ify
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/util')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/util/SBData.kt | 15 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/util/render/block.kt | 4 |
2 files changed, 2 insertions, 17 deletions
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() } } |