Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.2 Update #106

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ org.gradle.daemon=false

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.21
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.14.23

# Mod Properties
mod_version = 2.3.1
Expand All @@ -17,4 +17,4 @@ artifactId = xray

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.83.0+1.20
fabric_version=0.90.0+1.20.2
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/XrayMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public void onHudRender(DrawContext context, float tickDelta) {
TextRenderer render = mc.textRenderer;
ClientPlayerEntity player = mc.player;

if (!config.getLocationConfig().isEnabled() || player == null || mc.options.debugEnabled) {
if (!config.getLocationConfig().isEnabled() || player == null || mc.getDebugHud().shouldShowDebugHud()) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Pseudo
@Mixin(targets = "me.jellysquid.mods.sodium.client.render.occlusion.BlockOcclusionCache")
@Mixin(targets = "me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache")
public class MixinBlockOcclusionCache {
@Inject(at = @At("HEAD"), method = "shouldDrawSide", cancellable = true, remap = false)
private void shouldDrawSide(BlockState state, BlockView reader, BlockPos pos, Direction face,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/screen/BlockSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public List<Block> getView() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float partialTick) {
renderBackground(context);
renderInGameBackground(context);
searchBar.render(context, mouseX, mouseY, partialTick);
int left = width / 2 - elementsX * 18 / 2;
int top = height / 2 - elementsY * 18 / 2;
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/fr/atesab/xray/screen/ColorSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,6 @@ public ColorSelector(Screen parent, Consumer<OptionalInt> setter, OptionalInt co

@Override
public void tick() {
tfr.tick();
tfg.tick();
tfb.tick();
tfh.tick();
tfs.tick();
tfl.tick();
hexColor.tick();
intColor.tick();
super.tick();
}

Expand All @@ -181,7 +173,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float partialTic
// allow multiple color modifiers
setPickerState(localHue, localSaturation, localLightness);

renderBackground(context);
renderInGameBackground(context);

if (!advanced) {
// S PICKER
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/screen/KeySelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public boolean shouldCloseOnEsc() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
context.drawCenteredTextWithShadow(textRenderer, getTitle(), width / 2, height / 2 - 30 - textRenderer.fontHeight,
0xffffffff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ protected void init() {

@Override
public void tick() {
nameBox.tick();
super.tick();
}

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
nameBox.render(context, mouseX, mouseY, delta);
super.render(context, mouseX, mouseY, delta);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/screen/XrayBlockMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public List<Block> getView() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float partialTick) {
renderBackground(context);
renderInGameBackground(context);
searchBar.render(context, mouseX, mouseY, partialTick);

int left = width / 2 - elementsX * 18 / 2;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/screen/XrayConfigMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void openLink(URL url) {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
context.drawCenteredTextWithShadow(textRenderer, title, width / 2,
height / 2 - 52 - textRenderer.fontHeight, 0xffffffff);
super.render(context, mouseX, mouseY, delta);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/screen/XrayEntityMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public List<EntityUnion> getView() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float partialTick) {
renderBackground(context);
renderInGameBackground(context);
searchBar.render(context, mouseX, mouseY, partialTick);

int left = width / 2 - elementsX * 18 / 2;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/fr/atesab/xray/screen/XrayLocationConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void init() {
format.setText(mod.getConfig().getLocationConfig().getFormat());
format.setChangedListener(mod.getConfig().getLocationConfig()::setFormat);
if (position != 0) {
format.setCursor(position);
format.setCursor(position, false);
position = 0;
}
addSelectableChild(format);
Expand Down Expand Up @@ -100,13 +100,12 @@ public void resize(MinecraftClient client, int w, int h) {

@Override
public void tick() {
format.tick();
super.tick();
}

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
context.drawCenteredTextWithShadow(textRenderer, Text.translatable("x13.mod.location"), width / 2,
height / 2 - 52 - textRenderer.fontHeight, 0xffffffff);
GuiUtils.drawRightString(context, textRenderer, I18n.translate("x13.mod.location.format") + ": ", format,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected void applyValue() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
super.render(context, mouseX, mouseY, delta);
}
}
2 changes: 1 addition & 1 deletion src/main/java/fr/atesab/xray/screen/XrayMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected void save() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
MatrixStack stack = context.getMatrices();
stack.push();
stack.translate(width / 2f, height / 2f - 70, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fr/atesab/xray/screen/page/PagedElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ public boolean mouseReleased(double mouseX, double mouseY, int button) {
}

@Override
public boolean mouseScrolled(double mouseX, double mouseY, double scroll) {
public boolean mouseScrolled(double mouseX, double mouseY, double scroll, double verticalAmount) {
for (Element w : guiListeners)
if (w.mouseScrolled(mouseX, mouseY, scroll))
if (w.mouseScrolled(mouseX, mouseY, scroll, verticalAmount))
return true;
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/fr/atesab/xray/screen/page/PagedScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private void computePages(boolean updateDelta) {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context);
renderInGameBackground(context);
applyToAllElement((element, deltaY) -> {
MatrixStack stack = context.getMatrices();
stack.translate(0, deltaY, 0);
Expand Down Expand Up @@ -297,14 +297,14 @@ public boolean mouseReleased(double mouseX, double mouseY, int button) {
}

@Override
public boolean mouseScrolled(double mouseX, double mouseY, double scroll) {
public boolean mouseScrolled(double mouseX, double mouseY, double scroll, double verticalAmount) {
if (scroll < 0) {
nextPage();
} else {
lastPage();
}
applyToAllElement((element, deltaY) -> element.mouseScrolled(mouseX, mouseY - deltaY, scroll));
return super.mouseScrolled(mouseX, mouseY, scroll);
applyToAllElement((element, deltaY) -> element.mouseScrolled(mouseX, mouseY - deltaY, scroll, verticalAmount));
return super.mouseScrolled(mouseX, mouseY, scroll, verticalAmount);
}

@Override
Expand Down
Loading