Replace dev-only reflection with access transformer entry

This commit is contained in:
Jonas Herzig
2019-04-24 14:03:17 +02:00
parent fa8f8f52aa
commit 6127e0a027
2 changed files with 3 additions and 2 deletions

View File

@@ -7,7 +7,6 @@ import com.replaymod.render.blend.BlendState;
import com.replaymod.render.blend.Exporter;
import com.replaymod.render.blend.data.DMesh;
import com.replaymod.render.blend.data.DObject;
import com.replaymod.replaystudio.us.myles.ViaVersion.util.ReflectionUtil;
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Vector3f;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GLAllocation;
@@ -75,7 +74,7 @@ public class ChunkExporter implements Exporter {
@SuppressWarnings("unchecked")
List<ContainerLocalRenderInformation> renderInfos = mc.renderGlobal.renderInfos;
for (ContainerLocalRenderInformation renderInfo : renderInfos) {
RenderChunk renderChunk = ReflectionUtil.get(renderInfo, "renderChunk", RenderChunk.class); // SneakyThrows
RenderChunk renderChunk = renderInfo.renderChunk;
CompiledChunk compiledChunk = renderChunk.getCompiledChunk();
if (!compiledChunk.isEmpty()) {
addChunkUpdate(renderChunk, null);

View File

@@ -112,8 +112,10 @@ public net.minecraft.client.renderer.WorldRenderer field_72740_G # renderEntitie
##if MC>=11300
public net.minecraft.client.renderer.WorldRenderer$ContainerLocalRenderInformation
public net.minecraft.client.renderer.WorldRenderer$ContainerLocalRenderInformation field_178036_a # renderChunk
##else
#$$ public net.minecraft.client.renderer.RenderGlobal$ContainerLocalRenderInformation
#$$ public net.minecraft.client.renderer.RenderGlobal$ContainerLocalRenderInformation field_178036_a # renderChunk
##endif
# ChunkRenderDispatcher