From e870e5c48b363199eeb841a6c68c9b17cef394e6 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Thu, 17 Oct 2024 19:54:04 +0200 Subject: [PATCH] Fix laser crash --- .../de/ellpeck/actuallyadditions/mod/util/AssetUtil.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index c02c5e0f0..91b70ae72 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -11,14 +11,14 @@ package de.ellpeck.actuallyadditions.mod.util; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.*; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTypes; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.particle.ParticleBeam; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; @@ -30,7 +30,6 @@ import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.resources.language.I18n; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; @@ -356,7 +355,6 @@ public final class AssetUtil { Matrix4f matrix = matrixStack.last().pose(); RenderSystem.setShader(GameRenderer::getPositionColorLightmapShader); - var bufferbuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR_LIGHTMAP); TextureAtlasSprite sprite = Minecraft.getInstance().getTextureAtlas(TextureAtlas.LOCATION_BLOCKS).apply(FORGE_WHITE); float minU = sprite.getU0(); @@ -390,7 +388,6 @@ public final class AssetUtil { } matrixStack.popPose(); - BufferUploader.drawWithShader(bufferbuilder.buildOrThrow()); }