Update 1.14.4 yarn

This commit is contained in:
Jonas Herzig
2020-03-30 18:08:01 +02:00
parent ba83aa97b3
commit 527562549b
48 changed files with 214 additions and 225 deletions

View File

@@ -1,7 +1,7 @@
//#if MC>=10800 && MC<11500
package com.replaymod.render.mixin;
import net.minecraft.client.render.chunk.ChunkBatcher;
import net.minecraft.client.render.chunk.ChunkBuilder;
import net.minecraft.client.render.chunk.ChunkRenderTask;
import net.minecraft.client.render.chunk.ChunkRenderWorker;
import org.spongepowered.asm.mixin.Mixin;
@@ -14,7 +14,7 @@ import java.util.concurrent.PriorityBlockingQueue;
//$$ import java.util.concurrent.BlockingQueue;
//#endif
@Mixin(ChunkBatcher.class)
@Mixin(ChunkBuilder.class)
public interface ChunkRenderDispatcherAccessor {
@Accessor("workers")
List<ChunkRenderWorker> getListThreadedWorkers();

View File

@@ -2,7 +2,7 @@
package com.replaymod.render.mixin;
import com.replaymod.render.hooks.ChunkLoadingRenderGlobal;
import net.minecraft.client.render.chunk.ChunkBatcher;
import net.minecraft.client.render.chunk.ChunkBuilder;
import net.minecraft.client.render.VisibleRegion;
import net.minecraft.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
@@ -37,10 +37,10 @@ public abstract class MixinRenderGlobal {
private boolean replayModRender_passThroughSetupTerrain;
@Shadow
public boolean terrainUpdateNecessary;
public boolean needsTerrainUpdate;
@Shadow
public ChunkBatcher chunkBatcher;
public ChunkBuilder chunkBuilder;
@Shadow
public abstract void setUpTerrain(
@@ -90,9 +90,9 @@ public abstract class MixinRenderGlobal {
playerSpectator
);
replayModRender_hook.updateChunks();
} while (this.terrainUpdateNecessary);
} while (this.needsTerrainUpdate);
this.terrainUpdateNecessary = true;
this.needsTerrainUpdate = true;
replayModRender_passThroughSetupTerrain = false;
ci.cancel();
@@ -118,7 +118,7 @@ public abstract class MixinRenderGlobal {
// Prior to 1.9.4, MC always uses the same ChunkRenderDispatcher instance
//#if MC>=10904
@Inject(method = "setWorld", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/chunk/ChunkBatcher;stop()V"))
@Inject(method = "setWorld", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/chunk/ChunkBuilder;stop()V"))
private void stopWorkerThreadsAndChunkLoadingRenderGlobal(CallbackInfo ci) {
if (replayModRender_hook != null) {
replayModRender_hook.updateRenderDispatcher(null);
@@ -129,7 +129,7 @@ public abstract class MixinRenderGlobal {
@Inject(method = "reload", at = @At(value = "RETURN"))
private void setupChunkLoadingRenderGlobal(CallbackInfo ci) {
if (replayModRender_hook != null) {
replayModRender_hook.updateRenderDispatcher(this.chunkBatcher);
replayModRender_hook.updateRenderDispatcher(this.chunkBuilder);
}
}
}

View File

@@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
import java.util.Set;
//#if MC>=10800
import net.minecraft.client.render.chunk.ChunkBatcher;
import net.minecraft.client.render.chunk.ChunkBuilder;
import net.minecraft.client.render.chunk.ChunkRenderer;
//#endif
@@ -18,13 +18,13 @@ public interface WorldRendererAccessor {
void setRenderEntitiesStartupCounter(int value);
//#if MC>=10800
@Accessor("chunkBatcher")
ChunkBatcher getRenderDispatcher();
@Accessor("chunkBuilder")
ChunkBuilder getRenderDispatcher();
@Accessor("terrainUpdateNecessary")
@Accessor("needsTerrainUpdate")
void setDisplayListEntitiesDirty(boolean value);
@Accessor("chunkRenderers")
@Accessor("chunksToRebuild")
Set<ChunkRenderer> getChunksToUpdate();
//#endif
//#endif