mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-26 09:38:08 -05:00
Use a Slice over the Shift.BEFORE by -6 (#644)
* Use a Slice over the Shift.BEFORE by -6 This is much less prone to breakage and possibly more precise. * bump version
This commit is contained in:
parent
2521f6a319
commit
1aa9d47288
2 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-rendering-v1"
|
||||
version = getSubprojectVersion(project, "1.1.0")
|
||||
version = getSubprojectVersion(project, "1.1.1")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -19,6 +19,7 @@ package net.fabricmc.fabric.mixin.client.rendering;
|
|||
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.Slice;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
@ -28,7 +29,7 @@ import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
|
|||
|
||||
@Mixin(InGameHud.class)
|
||||
public class MixinInGameHud {
|
||||
@Inject(method = "render", at = @At(value = "RETURN", shift = At.Shift.BY, by = -6))
|
||||
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;color4f(FFFF)V"), slice = @Slice(from = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/PlayerListHud;render(Lnet/minecraft/client/util/math/MatrixStack;ILnet/minecraft/scoreboard/Scoreboard;Lnet/minecraft/scoreboard/ScoreboardObjective;)V")))
|
||||
public void render(MatrixStack matrixStack, float tickDelta, CallbackInfo callbackInfo) {
|
||||
HudRenderCallback.EVENT.invoker().onHudRender(matrixStack, tickDelta);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue