Skip to content

Commit

Permalink
fix: remove implicit references in mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff authored and Sychic committed May 4, 2024
1 parent 3a52a76 commit 1a3681f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private int alwaysShowItemHighlight(int original) {

@ModifyArgs(method = "renderToolHightlight", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawStringWithShadow(Ljava/lang/String;FFI)I"))
private void modifyItemHighlightPosition(Args args) {
GuiIngameForgeHookKt.modifyItemHighlightPosition(args, highlightingItemStack);
GuiIngameForgeHookKt.modifyItemHighlightPosition(args, this.highlightingItemStack);
}

@ModifyArgs(method = "renderRecordOverlay", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;translate(FFF)V"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private String printFormattedText(IChatComponent iChatComponent) {

@Inject(method = "getChatComponent", at = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/GuiNewChat;scrollPos:I"), cancellable = true, locals = LocalCapture.CAPTURE_FAILSOFT)
private void stopOutsideWindow(int mouseX, int mouseY, CallbackInfoReturnable<IChatComponent> cir, ScaledResolution scaledresolution, int i, float f, int j, int k, int l) {
int line = k / mc.fontRendererObj.FONT_HEIGHT;
int line = k / this.mc.fontRendererObj.FONT_HEIGHT;
if (line >= getLineCount()) cir.setReturnValue(null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class MixinItemRenderer {

@WrapOperation(method = "renderItemInFirstPerson", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/AbstractClientPlayer;getItemInUseCount()I"))
private int getItemInUseCountForFirstPerson(AbstractClientPlayer abstractClientPlayer, Operation<Integer> original) {
return ItemRendererHookKt.getItemInUseCountForFirstPerson(abstractClientPlayer, itemToRender, original);
return ItemRendererHookKt.getItemInUseCountForFirstPerson(abstractClientPlayer, this.itemToRender, original);
}

@Inject(method = "transformFirstPersonItem", at = @At(value = "TAIL"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ private void resetAlpha(EntityLivingBase entitylivingbaseIn, float p_177182_2_,

@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/entity/layers/LayerArmorBase;renderGlint(Lnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/client/model/ModelBase;FFFFFFF)V"), cancellable = true)
private void replaceArmorGlint(EntityLivingBase entitylivingbaseIn, float p_177182_2_, float p_177182_3_, float partialTicks, float p_177182_5_, float p_177182_6_, float p_177182_7_, float scale, int armorSlot, CallbackInfo ci) {
LayerArmorBaseHookKt.replaceArmorGlint(this, renderer, entitylivingbaseIn, p_177182_2_, p_177182_3_, partialTicks, p_177182_5_, p_177182_6_, p_177182_7_, scale, armorSlot, ci);
LayerArmorBaseHookKt.replaceArmorGlint(this, this.renderer, entitylivingbaseIn, p_177182_2_, p_177182_3_, partialTicks, p_177182_5_, p_177182_6_, p_177182_7_, scale, armorSlot, ci);
}
}

0 comments on commit 1a3681f

Please sign in to comment.