Skip to content

Commit c44fdbd

Browse files
feat: port to 1.21.4
1 parent 79d963e commit c44fdbd

File tree

6 files changed

+28
-29
lines changed

6 files changed

+28
-29
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ bin/
2828

2929
remappedSrc/
3030
run/
31+
32+
.DS_Store

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [21.4.0]
2+
3+
### Changes
4+
5+
- Ported to 1.21.4
6+
17
## [21.2.0]
28

39
### Changes

README.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
1-
![XRay Logo](.github/assets/xray-fabric-logo.svg)
1+
![XRay Logo](https://raw.githubusercontent.com/AdvancedXRay/XRay-Fabric/refs/heads/main/.github/assets/xray-fabric-logo.svg)
22

3-
# Advanced XRay (Fabric Edition)
3+
# [Advanced XRay (Fabric Edition)](https://www.curseforge.com/minecraft/mc-mods/advanced-xray-fabric-edition)
44

5-
![Build and Package](https://github.com/MichaelHillcox/XRay-Mod/workflows/Build%20and%20Package/badge.svg)
6-
[![GitHub license](https://img.shields.io/github/license/MichaelHillcox/XRay-Fabric)](https://github.com/MichaelHillcox/XRay-Fabric/blob/main/LICENSE)
7-
[![GitHub stars](https://img.shields.io/github/stars/MichaelHillcox/XRay-Fabric)](https://github.com/MichaelHillcox/XRay-Fabric/stargazers)
8-
[![GitHub issues](https://img.shields.io/github/issues/MichaelHillcox/XRay-Fabric)](https://github.com/MichaelHillcox/XRay-Fabric/issues)
9-
![GitHub all releases](https://img.shields.io/github/downloads/michaelhillcox/xray-Fabric/total)
10-
![GitHub release (latest by date)](https://img.shields.io/github/v/release/michaelhillcox/xray-Fabric)
11-
![GitHub Release Date](https://img.shields.io/github/release-date/michaelhillcox/xray-Fabric)
12-
![GitHub last commit](https://img.shields.io/github/last-commit/michaelhillcox/xray-Fabric)
13-
[![Build Status](https://ci.mikey.pro/buildStatus/icon?job=XRay-Fabric%2Fmain)](https://ci.mikey.pro/job/XRay-Fabric/job/main/)
5+
Find the project on [CurseForge](https://www.curseforge.com/minecraft/mc-mods/advanced-xray-fabric-edition)
146

15-
Fabric Loader based XRay mod designed to aid players who don't like the ore searching process. This mod is an exact 1:1 copy of my [Advanced XRay Forge Mod](https://github.com/MichaelHillcox/XRay-Mod/) which is typically the more up-to-date version of the mod.
7+
[![](https://cf.way2muchnoise.eu/short_444663.svg)](https://www.curseforge.com/minecraft/mc-mods/advanced-xray-fabric-edition)
8+
[![](https://cf.way2muchnoise.eu/versions/444663.svg)](https://www.curseforge.com/minecraft/mc-mods/advanced-xray-fabric-edition)
169

17-
[![Discord invite link](.github/assets/discord-join-badge.svg)](https://discord.gg/yYNuqJxucJ)
10+
[![GitHub license](https://img.shields.io/github/license/advancedxray/XRay-Fabric)](https://github.com/advancedxray/XRay-Fabric/blob/main/LICENSE)
11+
[![GitHub issues](https://img.shields.io/github/issues/advancedxray/XRay-Fabric)](https://github.com/advancedxray/XRay-Fabric/issues)
12+
![GitHub Release Date](https://img.shields.io/github/release-date/advancedxray/xray-Fabric)
13+
![GitHub last commit](https://img.shields.io/github/last-commit/advancedxray/xray-Fabric)
14+
15+
Fabric Loader based XRay mod designed to aid players who don't like the ore searching process. This mod is an exact 1:1 copy of my [Advanced XRay Forge Mod](https://github.com/advancedxray/XRay-Mod/) which is typically the more up-to-date version of the mod.
1816

1917
##### Looking for the Forge version? Click the button below :tada:
2018

21-
<a href="https://github.com/michaelhillcox/xray-mod"><img src=".github/assets/xray-forge-badge.svg" alt="drawing" width="265"/>
19+
<a href="https://github.com/advancedxray/xray-mod"><img src="https://raw.githubusercontent.com/AdvancedXRay/XRay-Fabric/refs/heads/main/.github/assets/xray-forge-badge.svg" alt="drawing" width="265"/>
2220
</a>
2321

24-
## Disclaimer
25-
I am a `Forge Mod` Developer, not a Fabric Mod Developer, I am doing this mod per user request and out of pure intrest in learning a new API. The current status of this mod is `Unreleased` as the mod is currently a `WIP`. Don't `@` me.
26-
2722
## Features
2823
Advanced XRay Fabric Edition is a feature rich XRay / Block ESP mod designed to aid players in the block searching process. I've designed the mod to be as user friendly as possible. Out of the box you'll have *Easy to use GUI for adding, deleting and editing block you want to find*, *Full RGB color picker support*, *Searchable block list with in-hand and in-world options for adding blocks*, *Json Stored list to share and edit easily outside of the game*.
2924

30-
## How to use (TBA)
25+
## How to use
3126

3227
**Using XRay**
3328

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Done to increase the memory available to gradle.
22
org.gradle.jvmargs=-Xmx4G
3-
minecraft_version=1.21.2
3+
minecraft_version=1.21.4
44

55
# Mod Properties
6-
mod_version=21.2.0
6+
mod_version=21.4.0
77
maven_group=pro.mikey
88
archives_base_name=advanced-xray-fabric
99

1010
loader_version=0.16.9
11-
fabric_version=0.106.1+1.21.2
11+
fabric_version=0.112.0+1.21.4
1212

1313
curse_id=444663

src/client/java/pro/mikey/fabric/xray/screens/forge/GuiSelectionScreen.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ public void init() {
8888
this.render = Minecraft.getInstance().getItemRenderer();
8989
// this.buttons.clear();
9090

91-
this.scrollList = new ScrollingBlockList((this.getWidth() / 2) - 37, this.getHeight() / 2 + 10, 203, 185, this.itemList, this);
92-
this.addRenderableWidget(this.scrollList);
93-
9491
this.search = new EditBox(this.getFontRender(), this.getWidth() / 2 - 137, this.getHeight() / 2 - 105, 202, 18, Component.empty());
9592
this.search.setCanLoseFocus(true);
9693

@@ -170,6 +167,9 @@ public void init() {
170167
this.minecraft.setScreen(new GuiHelp());
171168
}).pos(this.getWidth() / 2 + 79, this.getHeight() / 2 + 58).size(60,20).build());
172169
this.addRenderableWidget(new Button.Builder(Component.translatable("xray.single.close"), button -> this.onClose()).pos((this.getWidth() / 2 + 79) + 62, this.getHeight() / 2 + 58).size(59,20).build());
170+
171+
this.scrollList = new ScrollingBlockList((this.getWidth() / 2) - 37, this.getHeight() / 2 + 10, 203, 185, this.itemList, this);
172+
this.addRenderableWidget(this.scrollList);
173173
}
174174

175175
private void updateSearch() {
@@ -277,10 +277,6 @@ void updateEntries(List<BlockEntry> blocks) {
277277
blocks.forEach(block -> this.addEntry(new BlockSlot(block, this))); // @mcp: func_230513_b_ = addEntry
278278
}
279279

280-
@Override
281-
public Optional<GuiEventListener> getChildAt(double mouseX, double mouseY) {
282-
return Optional.empty();
283-
}
284280

285281
public class BlockSlot extends AbstractSelectionList.Entry<BlockSlot> {
286282
BlockEntry block;

src/client/java/pro/mikey/fabric/xray/screens/forge/ScrollingList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void renderWidget(GuiGraphics stack, int mouseX, int mouseY, float partia
2222
}
2323

2424
@Override
25-
protected int getScrollbarPosition() {
25+
protected int scrollBarX() {
2626
return (this.getX() + this.width) - 6;
2727
}
2828

0 commit comments

Comments
 (0)