Compatibility issue with Smooth Scrolling
SmajloSlovakian opened this issue ยท 1 comments
original issue: SmajloSlovakian/Minecraft-Smooth-Scrolling#36
the item borders don't scroll smoothly in the creative inventory with this mod enabled... i have made two fabric object shares which should help you improve the compatibility with this mod...
in case you don't know how to use object shares, i have this example:
if (FabricLoader.getInstance().getObjectShare().get("raised:hud") instanceof Integer distance) {
doSomethingWith(distance)
}
the two objects i share are: "smoothsc:creative_screen/item_count" and "smoothsc:creative_screen/y_offset"
y_offset is the offset you have to move the border up or down
item_count is the count of the items to apply the offset to (i share this so you don't have to count the items inside the creative menu excluding hotbar items)
you also may have to account for the scissor (mask) which makes it so that stuff doesn't render outside the screen and so it looks better
the testing mod build can be found here in the artifacts: https://github.com/SmajloSlovakian/Minecraft-Smooth-Scrolling/actions/runs/9373784327
let me know if you're interested or if you have a better idea, hope this helps