Compare commits

...
Author SHA1 Message Date
Calvin Reveraster 208373deaa Fix any dimension without a sky getting flagged as the nether (#857)
* fix crash when connected textures are disabled, but custom colors are enabled.

* Dimension Check Fix

Dimension check set any dimension with no sky as the nether; this includes the end, and several custom dims such as Witchery's mirror dim, etc.
2025-02-01 09:18:29 -08:00
TotallyNotOndre f22a3f612b Fix slider dragging in iris options (#858) 2025-02-01 09:17:26 -08:00
4 changed files with 18 additions and 1 deletions

No files matched your search

+1 -1
View File
@@ -537,7 +537,7 @@ public class Iris {
if (level != null) {
if (level.provider == null) return DimensionId.OVERWORLD;
if ((level.provider.isHellWorld || level.provider.hasNoSky) || level.provider.dimensionId == -1) {
if (level.provider.isHellWorld || level.provider.dimensionId == -1) {
return DimensionId.NETHER;
} else if (level.provider.dimensionId == 1) {
return DimensionId.END;
@@ -91,6 +91,17 @@ public class ShaderPackOptionList extends IrisGuiSlot {
final BaseEntry entry = this.entries.get(index);
return entry.mouseClicked(mouseX, mouseY, mouseButton);
}
@Override
public boolean mouseReleased( int mouseX, int mouseY, int button) {
final int relativeY = mouseY - this.top - this.headerPadding + (int) this.amountScrolled - 4;
final int index = relativeY / this.slotHeight;
if (index < 0 || index >= this.entries.size())
return false;
final BaseEntry entry = this.entries.get(index);
return entry.mouseReleased(mouseX, mouseY, button);
}
@Override
protected boolean isSelected(int idx) {
@@ -12,6 +12,7 @@ public abstract class BaseEntry {
}
public abstract boolean mouseClicked(int mouseX, int mouseY, int button);
public abstract boolean mouseReleased(int mouseX, int mouseY, int button);
public abstract void drawEntry(ShaderPackScreen screen, int index, int x, int y, int slotWidth, int slotHeight, Tessellator tessellator, int mouseX, int mouseY, boolean isMouseOver);
@@ -108,6 +108,11 @@ public class HeaderEntry extends BaseEntry {
return backButtonResult || utilButtonResult;
}
@Override
public boolean mouseReleased(int mouseX, int mouseY, int button) {
return false;
}
private boolean backButtonClicked(IrisElementRow.TextButtonElement button) {
this.navigation.back();
GuiUtil.playButtonClickSound();