-
Notifications
You must be signed in to change notification settings - Fork 11
1.21.3 + Neoforge #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package gjum.minecraft.civ.snitchmod.forge.mixins; | ||
|
|
||
| import com.mojang.blaze3d.vertex.PoseStack; | ||
| import gjum.minecraft.civ.snitchmod.forge.ForgeSnitchMod; | ||
| import net.minecraft.client.renderer.LevelRenderer; | ||
| import net.minecraft.client.renderer.RenderType; | ||
| import org.joml.Matrix4f; | ||
| 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; | ||
|
|
||
| @Mixin(LevelRenderer.class) | ||
| public abstract class LevelRenderMixin { // REMINDER: Forge sucks | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it make sense to use this mixin with all mod loaders? to reduce disparities which may lead to different behavior on different loaders
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could but the mixin is currently just replicating the behaviour provided by the other loaders because Forge removed the event without a replacement. |
||
| @Inject(method = "renderSectionLayer", at = @At("RETURN")) | ||
| private void onRenderLevelLast(RenderType arg, double d, double e, double f, Matrix4f matrix4f, Matrix4f matrix4f2, CallbackInfo ci) { | ||
| if (arg == RenderType.translucent()) { | ||
| ForgeSnitchMod.getMod().handleRenderBlockOverlay(new PoseStack().last().pose()); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "required": true, | ||
| "minVersion": "0.8", | ||
| "package": "gjum.minecraft.civ.snitchmod.forge.mixins", | ||
| "compatibilityLevel": "JAVA_21", | ||
| "mixins": [], | ||
| "client": [ | ||
| "LevelRenderMixin" | ||
| ], | ||
| "server": [], | ||
| "injectors": { | ||
| "defaultRequire": 1 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "pack": { | ||
| "description": "Snitch Mod", | ||
| "pack_format": 34 | ||
| "pack_format": 42 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this not result in z fighting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't for me. It isn't really necessary though, it just always bothered me to have the box that much smaller than the lines.