Skip to content

Instantly share code, notes, and snippets.

@hammy275
Created March 31, 2024 21:30
Show Gist options
  • Save hammy275/fbf6ae4a1d46a986d3ae61468d4d979c to your computer and use it in GitHub Desktop.
Save hammy275/fbf6ae4a1d46a986d3ae61468d4d979c to your computer and use it in GitHub Desktop.
@ModifyVariable(method = "renderArmWithItem(Lnet/minecraft/client/player/AbstractClientPlayer;FFLnet/minecraft/world/InteractionHand;FLnet/minecraft/world/item/ItemStack;FLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V",
at = @At("HEAD"), index = 6, ordinal = 0, argsOnly = true)
private ItemStack overwriteItemStack(ItemStack stack, AbstractClientPlayer player, float f, float g, InteractionHand hand) {
// Your code here. You can check the hand to see what hand we're currently rendering, and the ItemStack returned from
// this function is what will be used in rendering (you can return the provided stack to just render the item that was
// going to be rendered anyways).
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment