I actually wanted to put the commit name as the PR title but it's kinda long, you can read that for the actual title
To explain the issue, REI recipes or any other screen that is opened from the inventory screen creates a call to the removed method in SkyblockInventoryScreen, but if that screen opens back the same instance of the SkyblockInventoryScreen the slot will be positioned 21 pixels to the left since the logic to move it back was in the constructor - which isn't called in this case.
This PR makes it move the slot in the onDisplayed method, which is called each time the current screen is set, just like removed.
I actually wanted to put the commit name as the PR title but it's kinda long, you can read that for the actual title
To explain the issue, REI recipes or any other screen that is opened from the inventory screen creates a call to the
removed
method inSkyblockInventoryScreen
, but if that screen opens back the same instance of theSkyblockInventoryScreen
the slot will be positioned 21 pixels to the left since the logic to move it back was in the constructor - which isn't called in this case.This PR makes it move the slot in the
onDisplayed
method, which is called each time the current screen is set, just likeremoved
.