TeamREPENTOGON / TeamREPENTOGON/REPENTOGON
CropOffset does not support vanilla items, even if activegfx is set
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 345
- Forks
- 51
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 4
Description
Using the MC_PRE_PLAYERHUD_RENDER_ACTIVE_ITEM callback to change a vanilla active item's CropOffset doesn't do anything, even if it's an active that doesn't normally change its graphics already. Other args in the return table seem to work fine, though.
function PibersMod:PreRenderLemonMishap(player, slot, offset, alpha, scale, chargebaroffset)
return {CropOffset=Vector(32,0)}
end
PibersMod:AddCallback(ModCallbacks.MC_PRE_PLAYERHUD_RENDER_ACTIVE_ITEM, PibersMod.PreRenderLemonMishap, CollectibleType.COLLECTIBLE_LEMON_MISHAP)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the implementation of MC_PRE_PLAYERHUD_RENDER_ACTIVE_ITEM and trace how CropOffset is applied to vanilla active items, including the activegfx case. Reproduce the Lemon Mishap example and verify that returning CropOffset changes its rendered crop while the other return-table arguments continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- api, game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100