-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Indium incompatibility * I forgot to mark this as dynamic * Use ModifyExpressionValue instead of WrapOperation --------- Co-authored-by: LambdAurora <[email protected]>
- Loading branch information
1 parent
e65846c
commit 5ba107a
Showing
7 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/dev/lambdaurora/lambdynlights/mixin/indium/TerrainRenderContextMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright © 2024 LambdAurora <[email protected]> | ||
* | ||
* This file is part of LambDynamicLights. | ||
* | ||
* Licensed under the MIT license. For more information, | ||
* see the LICENSE file. | ||
*/ | ||
|
||
package dev.lambdaurora.lambdynlights.mixin.indium; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import dev.lambdaurora.lambdynlights.LambDynLights; | ||
import link.infra.indium.renderer.render.AbstractBlockRenderContext; | ||
import link.infra.indium.renderer.render.TerrainRenderContext; | ||
import org.spongepowered.asm.mixin.Dynamic; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Pseudo | ||
@Mixin(value = TerrainRenderContext.class, remap = false) | ||
public abstract class TerrainRenderContextMixin extends AbstractBlockRenderContext { | ||
@Dynamic | ||
@ModifyExpressionValue(method = "bufferQuad", at = @At(value = "INVOKE", target = "Llink/infra/indium/renderer/mesh/MutableQuadViewImpl;lightmap(I)I"), require = 0) | ||
private int lambdynlights$getLightmap(int original) { | ||
return LambDynLights.get().getLightmapWithDynamicLight(this.blockInfo.blockPos, original); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters