Add support for FREX Flawless Frames API (fixes #150)

This commit is contained in:
Jonas Herzig
2021-07-24 09:11:34 +02:00
parent 96bb1abc1d
commit d0620091d2
4 changed files with 51 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
package com.replaymod.render.hooks;
import com.replaymod.render.utils.FlawlessFrames;
import net.minecraft.client.render.WorldRenderer;
public class ForceChunkLoadingHook {
@@ -9,11 +10,13 @@ public class ForceChunkLoadingHook {
public ForceChunkLoadingHook(WorldRenderer renderGlobal) {
this.hooked = renderGlobal;
FlawlessFrames.setEnabled(true);
IForceChunkLoading.from(renderGlobal).replayModRender_setHook(this);
}
public void uninstall() {
IForceChunkLoading.from(hooked).replayModRender_setHook(null);
FlawlessFrames.setEnabled(false);
}
public interface IBlockOnChunkRebuilds {