mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-27 23:47:09 +01:00
Merge branch 'dev' into shader-pipeline
This commit is contained in:
commit
935f8efc00
7 changed files with 16 additions and 62 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
0.2.3:
|
||||||
|
Technical/API:
|
||||||
|
- Alter BeginFrameEvent to enable compatibility with optifine shadows
|
||||||
|
|
||||||
0.2.2:
|
0.2.2:
|
||||||
Fixes
|
Fixes
|
||||||
- Fix ConcurrentModificationException crash
|
- Fix ConcurrentModificationException crash
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
org.gradle.jvmargs=-Xmx3G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
# mod version info
|
# mod version info
|
||||||
mod_version=0.2.2
|
mod_version=0.2.3
|
||||||
mc_update_version=1.16
|
mc_update_version=1.16
|
||||||
minecraft_version=1.16.5
|
minecraft_version=1.16.5
|
||||||
forge_version=36.1.66
|
forge_version=36.1.66
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.jozufozu.flywheel.core;
|
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.culling.ClippingHelper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to capture the ClippingHelper from WorldRenderer#renderLevel
|
|
||||||
*/
|
|
||||||
public class Clipping {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Assigned in {@link com.jozufozu.flywheel.mixin.GlobalClippingHelperMixin this} mixin.
|
|
||||||
*/
|
|
||||||
public static ClippingHelper HELPER;
|
|
||||||
}
|
|
|
@ -7,22 +7,17 @@ import net.minecraft.client.renderer.GameRenderer;
|
||||||
import net.minecraft.client.renderer.LightTexture;
|
import net.minecraft.client.renderer.LightTexture;
|
||||||
import net.minecraft.client.renderer.culling.ClippingHelper;
|
import net.minecraft.client.renderer.culling.ClippingHelper;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
|
||||||
public class BeginFrameEvent extends Event {
|
public class BeginFrameEvent extends Event {
|
||||||
private final ClientWorld world;
|
private final ClientWorld world;
|
||||||
private final MatrixStack stack;
|
|
||||||
private final ActiveRenderInfo info;
|
private final ActiveRenderInfo info;
|
||||||
private final GameRenderer gameRenderer;
|
|
||||||
private final LightTexture lightTexture;
|
|
||||||
private final ClippingHelper clippingHelper;
|
private final ClippingHelper clippingHelper;
|
||||||
|
|
||||||
public BeginFrameEvent(ClientWorld world, MatrixStack stack, ActiveRenderInfo info, GameRenderer gameRenderer, LightTexture lightTexture, ClippingHelper clippingHelper) {
|
public BeginFrameEvent(ClientWorld world, ActiveRenderInfo info, ClippingHelper clippingHelper) {
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.stack = stack;
|
|
||||||
this.info = info;
|
this.info = info;
|
||||||
this.gameRenderer = gameRenderer;
|
|
||||||
this.lightTexture = lightTexture;
|
|
||||||
this.clippingHelper = clippingHelper;
|
this.clippingHelper = clippingHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,23 +25,15 @@ public class BeginFrameEvent extends Event {
|
||||||
return world;
|
return world;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MatrixStack getStack() {
|
|
||||||
return stack;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActiveRenderInfo getInfo() {
|
public ActiveRenderInfo getInfo() {
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameRenderer getGameRenderer() {
|
|
||||||
return gameRenderer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LightTexture getLightTexture() {
|
|
||||||
return lightTexture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClippingHelper getClippingHelper() {
|
public ClippingHelper getClippingHelper() {
|
||||||
return clippingHelper;
|
return clippingHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Vector3d getCameraPos() {
|
||||||
|
return info.getPosition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package com.jozufozu.flywheel.mixin;
|
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
import com.jozufozu.flywheel.core.Clipping;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.culling.ClippingHelper;
|
|
||||||
import net.minecraft.util.math.vector.Matrix4f;
|
|
||||||
|
|
||||||
@Mixin(ClippingHelper.class)
|
|
||||||
public class GlobalClippingHelperMixin {
|
|
||||||
|
|
||||||
@Inject(at = @At("TAIL"), method = "<init>")
|
|
||||||
private void init(Matrix4f p_i226026_1_, Matrix4f p_i226026_2_, CallbackInfo ci) {
|
|
||||||
Clipping.HELPER = (ClippingHelper) (Object) this;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import com.jozufozu.flywheel.backend.Backend;
|
import com.jozufozu.flywheel.backend.Backend;
|
||||||
import com.jozufozu.flywheel.backend.OptifineHandler;
|
import com.jozufozu.flywheel.backend.OptifineHandler;
|
||||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher;
|
import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher;
|
||||||
import com.jozufozu.flywheel.core.Clipping;
|
|
||||||
import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer;
|
import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer;
|
||||||
import com.jozufozu.flywheel.event.BeginFrameEvent;
|
import com.jozufozu.flywheel.event.BeginFrameEvent;
|
||||||
import com.jozufozu.flywheel.event.ReloadRenderersEvent;
|
import com.jozufozu.flywheel.event.ReloadRenderersEvent;
|
||||||
|
@ -25,6 +24,7 @@ import net.minecraft.client.renderer.LightTexture;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.RenderTypeBuffers;
|
import net.minecraft.client.renderer.RenderTypeBuffers;
|
||||||
import net.minecraft.client.renderer.WorldRenderer;
|
import net.minecraft.client.renderer.WorldRenderer;
|
||||||
|
import net.minecraft.client.renderer.culling.ClippingHelper;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.vector.Matrix4f;
|
import net.minecraft.util.math.vector.Matrix4f;
|
||||||
|
@ -44,9 +44,9 @@ public class RenderHooksMixin {
|
||||||
@Final
|
@Final
|
||||||
private RenderTypeBuffers renderBuffers;
|
private RenderTypeBuffers renderBuffers;
|
||||||
|
|
||||||
@Inject(at = @At(value = "INVOKE", target = "net.minecraft.client.renderer.WorldRenderer.compileChunksUntil(J)V"), method = "renderLevel")
|
@Inject(at = @At("HEAD"), method = "setupRender")
|
||||||
private void setupFrame(MatrixStack stack, float p_228426_2_, long p_228426_3_, boolean p_228426_5_, ActiveRenderInfo info, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projection, CallbackInfo ci) {
|
private void setupRender(ActiveRenderInfo info, ClippingHelper clippingHelper, boolean p_228437_3_, int frameCount, boolean isSpectator, CallbackInfo ci) {
|
||||||
MinecraftForge.EVENT_BUS.post(new BeginFrameEvent(level, stack, info, gameRenderer, lightTexture, Clipping.HELPER));
|
MinecraftForge.EVENT_BUS.post(new BeginFrameEvent(level, info, clippingHelper));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
"atlas.SheetDataAccessor",
|
"atlas.SheetDataAccessor",
|
||||||
"light.LightUpdateMixin",
|
"light.LightUpdateMixin",
|
||||||
"light.NetworkLightUpdateMixin",
|
"light.NetworkLightUpdateMixin",
|
||||||
"FastChunkProviderMixin",
|
"FastChunkProviderMixin"
|
||||||
"GlobalClippingHelperMixin"
|
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 0
|
"defaultRequire": 0
|
||||||
|
|
Loading…
Reference in a new issue