Skip to content

Commit db44326

Browse files
feat: port to 1.20.3
1 parent 4784fc3 commit db44326

7 files changed

Lines changed: 26 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
## [82.0.0]
1+
## [83.0.0]
22

33
### Changed
44

5-
- Updated to 1.20.2
6-
- Shifted versioning to be inline with Minecraft release numbers for the major game version (1.20.2 being 82 for example)
5+
- Updated to 1.20.3

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,13 @@ publishMods {
161161
file = project.tasks.jar.archiveFile
162162
}
163163
}
164+
165+
sourceSets.each {
166+
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
167+
it.output.resourcesDir = dir
168+
it.java.destinationDirectory = dir
169+
}
170+
171+
tasks.register("idePostSync") {
172+
173+
}

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
org.gradle.jvmargs=-Xmx4G
44

55
mod_id=xray
6-
mod_version=82.0.0
7-
minecraft_version=1.20.2
8-
minecraft_version_range=[%base],1.20.3
6+
mod_version=83.0.0
7+
minecraft_version=1.20.3
8+
minecraft_version_range=[%base],1.20.4
99

1010
# Forge
11-
forge_version=48.0.49
11+
forge_version=49.0.2
1212
curse_id=256256
1313

1414
loom.platform=forge
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/pro/mikey/xray/gui/GuiSelectionScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public void render(GuiGraphics guiGraphics, int entryIdx, int top, int left, int
305305
// Minecraft.getInstance().getItemRenderer().renderAndDecorateItem(stack, blockData.getItemStack(), left + 8, top + 7);
306306
// Lighting.setupForFlatItems();
307307

308-
if (mouseX > left && mouseX < (left + entryWidth) && mouseY > top && mouseY < (top + entryHeight) && mouseY < (this.parent.getTop() + this.parent.getHeight()) && mouseY > this.parent.getTop()) {
308+
if (mouseX > left && mouseX < (left + entryWidth) && mouseY > top && mouseY < (top + entryHeight) && mouseY < (this.parent.getY() + this.parent.getHeight()) && mouseY > this.parent.getY()) {
309309
guiGraphics.renderTooltip(
310310
font,
311311
Language.getInstance().getVisualOrder(Arrays.asList(Component.translatable("xray.tooltips.edit1"), Component.translatable("xray.tooltips.edit2"))),

src/main/java/pro/mikey/xray/gui/utils/ScrollingList.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,33 @@
1717
*/
1818
public class ScrollingList<E extends AbstractSelectionList.Entry<E>> extends AbstractSelectionList<E> {
1919
public ScrollingList(int x, int y, int width, int height, int slotHeightIn) {
20-
super(Minecraft.getInstance(), width, height, y - (height / 2), (y - (height / 2)) + height, slotHeightIn);
21-
this.setLeftPos(x - (width / 2));
20+
super(Minecraft.getInstance(), width, height, y - (height / 2), slotHeightIn);
21+
this.setX(x - (width / 2));
2222
this.setRenderBackground(false);
2323

2424
// this.setRenderTopAndBottom(false); // removes background
2525
}
2626

2727
@Override
28-
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
28+
public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
2929
double scale = Minecraft.getInstance().getWindow().getGuiScale();
3030

3131
GL11.glEnable(GL11.GL_SCISSOR_TEST);
32-
GL11.glScissor((int)(this.x0 * scale), (int)(Minecraft.getInstance().getWindow().getHeight() - ((this.y0 + this.height) * scale)),
32+
GL11.glScissor((int)(this.getX() * scale), (int)(Minecraft.getInstance().getWindow().getHeight() - ((this.getY() + this.height) * scale)),
3333
(int)(this.width * scale), (int)(this.height * scale));
3434

35-
super.render(guiGraphics, mouseX, mouseY, partialTicks);
35+
super.renderWidget(guiGraphics, mouseX, mouseY, partialTicks);
3636

3737
GL11.glDisable(GL11.GL_SCISSOR_TEST);
3838
}
3939

4040
@Override // @mcp: getScrollbarPosition = getScrollbarPosition
4141
protected int getScrollbarPosition() {
42-
return (this.x0 + this.width) - 6;
42+
return (this.getX() + this.width) - 6;
4343
}
4444

4545
@Override
46-
public void updateNarration(NarrationElementOutput p_169152_) {
46+
protected void updateWidgetNarration(NarrationElementOutput narrationElementOutput) {
4747

4848
}
4949
}

src/main/java/pro/mikey/xray/xray/Controller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class Controller {
2727
add(Blocks.AIR);
2828
add(Blocks.BEDROCK);
2929
add(Blocks.STONE);
30-
add(Blocks.GRASS);
30+
add(Blocks.GRASS_BLOCK);
3131
add(Blocks.DIRT);
3232
}};
3333

0 commit comments

Comments
 (0)