Skip to content

Commit

Permalink
slightly adjust slider value calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts committed Nov 20, 2024
1 parent aa1a69e commit 0cfad6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void setValue(int newValue, boolean notify) {
}

public void setValueFromMouse(int mouseX) {
setValue(Math.round((maxValue - minValue) * (float) (mouseX - xPosition + 4) / (width - 4)));
setValue(Math.round(minValue + (maxValue - minValue) * (float) (mouseX - xPosition + 4) / (width - 8)));
}

public String getText(FontRenderer font) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public abstract class GuiMultiblockHandler {
public void loadMultiblock(IConstructable multiblock, ItemStack stackForm, @NotNull ConstructableData data) {
renderingController = multiblock;
constructableData = data;
recipeGui = (GuiRecipe<?>) NEIClientUtils.getGuiContainer();

this.stackForm = stackForm;
if (stackForm.stackSize == 0) stackForm.stackSize = 1;
Expand Down Expand Up @@ -202,7 +203,6 @@ protected void loadChannels() {
}

protected void loadNewMultiblock() {
recipeGui = (GuiRecipe<?>) NEIClientUtils.getGuiContainer();
trigger = DEFAULT_TRIGGER.copy();
int tier = constructableData.getCurrentTier();
String channel = constructableData.getCurrentChannel();
Expand Down

0 comments on commit 0cfad6c

Please sign in to comment.