Skip to content

Commit

Permalink
feat: port to 1.20.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Dec 6, 2023
1 parent 2f24070 commit ba05a25
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [83.0.0]

### Changes

- Ported to 1.20.3

## [82.0.0]

Why have you bumped the version to 82.0.0? Well, it's a long story but the short and sweet of it is that 82 is the current incremental version of Minecraft for 1.20.2. For example 1.20.1 was 81. This makes it a little simpler for me to maintain versions across multiple Minecraft versions without having to worry about the version numbers conflicting.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'maven-publish'
id 'pro.mikey.plugins.insaniam' version "0.1-SNAPSHOT"
id "me.modmuss50.mod-publish-plugin" version "0.3.5"
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

def ENV = System.getenv();
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx4G
minecraft_version=1.20.2
minecraft_version=1.20.3

# Mod Properties
mod_version=82.0.0
mod_version=83.0.0
maven_group=pro.mikey
archives_base_name=advanced-xray-fabric

loader_version=0.14.22
fabric_version=0.89.2+1.20.2
loader_version=0.15.0
fabric_version=0.91.1+1.20.3

curse_id=444663
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public void render(GuiGraphics guiGraphics, int entryIdx, int top, int left, int
guiGraphics.renderItem(blockData.getStack(), left + 10, top + 7);
// Lighting.setupForFlatItems();

if (mouseX > left && mouseX < (left + entryWidth) && mouseY > top && mouseY < (top + entryHeight) && mouseY < (this.parent.y0 + this.parent.height) && mouseY > this.parent.y0) {
if (mouseX > left && mouseX < (left + entryWidth) && mouseY > top && mouseY < (top + entryHeight) && mouseY < (this.parent.getY() + this.parent.height) && mouseY > this.parent.getY()) {
guiGraphics.renderTooltip(font, Arrays.asList(Component.translatable("xray.tooltips.edit1").getVisualOrderText(), Component.translatable("xray.tooltips.edit2").getVisualOrderText()), left + 15, (entryIdx == this.parent.children().size() - 1 && entryIdx != 0 ? (top - (entryHeight - 20)) : (top + (entryHeight + 15))));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.minecraft.client.gui.components.AbstractSliderButton;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.contents.LiteralContents;

public class RatioSliderWidget extends AbstractSliderButton {
private final Component message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,36 @@ public class ScrollingList<E extends AbstractSelectionList.Entry<E>> extends Abs
width,
height,
y - (height / 2),
(y - (height / 2)) + height,
// (y - (height / 2)) + height,
slotHeightIn);
this.setLeftPos(x - (width / 2));
this.setX(x - (width / 2));
// this.setRenderTopAndBottom(false);
this.setRenderBackground(false); // removes background
}

@Override
public void render(GuiGraphics stack, int mouseX, int mouseY, float partialTicks) {
public void renderWidget(GuiGraphics stack, int mouseX, int mouseY, float partialTicks) {
double scale = this.minecraft.getWindow().getGuiScale();

GL11.glEnable(GL11.GL_SCISSOR_TEST);
GL11.glScissor(
(int) (this.x0 * scale),
(int) (this.minecraft.getWindow().getHeight() - ((this.y0 + this.height) * scale)),
(int) (this.getX() * scale),
(int) (this.minecraft.getWindow().getHeight() - ((this.getY() + this.height) * scale)),
(int) (this.width * scale),
(int) (this.height * scale));

super.render(stack, mouseX, mouseY, partialTicks);
super.renderWidget(stack, mouseX, mouseY, partialTicks);

GL11.glDisable(GL11.GL_SCISSOR_TEST);
}

@Override
protected int getScrollbarPosition() {
return (this.x0 + this.width) - 6;
return (this.getX() + this.width) - 6;
}

@Override
public void updateNarration(NarrationElementOutput builder) {
protected void updateWidgetNarration(NarrationElementOutput narrationElementOutput) {

}
}

0 comments on commit ba05a25

Please sign in to comment.