Skip to content

Commit

Permalink
fix #4, update to 1.20.2 properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalam360 committed Sep 28, 2023
1 parent 8a0f51f commit e47bdeb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 20 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Changelog

- Fix a crash on Turkish locales.

[Full Changelog](https://github.com/JamCoreModding/jam-lib/compare/0.6.0+1.20...0.6.1+1.20.x)
- Fix the mouse scroll event for 1.20.2
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("fabric-loom") version "1.2-SNAPSHOT"
id("io.github.juuxel.loom-quiltflower") version "1.+"
id("io.github.juuxel.loom-vineflower") version "1.+"
id("io.github.p03w.machete") version "1.+"
id("org.cadixdev.licenser") version "0.6.+"
}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true

archive_base_name=jamlib
mod_version=0.6.1+1.20.x
release_name=V0.6.1 [1.20.x]
supported_versions=1.20,1.20.1
mod_version=0.6.2+1.20.2
release_name=V0.6.2 [1.20.2]
supported_versions=1.20.2
github_user=JamCoreModding
github_repo=jam-lib
release_branch=1.20
release_branch=1.20.2
curseforge_project_id=623764
modrinth_project_id=jamlib
publish_to_maven=true
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ protected void init() {

@Override
public void render(GuiGraphics ctx, int mouseX, int mouseY, float delta) {
this.renderBackground(ctx);
this.renderBackground(ctx, mouseX, mouseY, delta);
this.list.render(ctx, mouseX, mouseY, delta);
ctx.drawCenteredShadowedText(textRenderer, title, width / 2, 15, 0xFFFFFF);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import io.github.jamalam360.jamlib.Ducks;
import io.github.jamalam360.jamlib.JamLib;
import java.util.Optional;
import java.util.UUID;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.RunArgs;
import net.minecraft.client.util.Session;
Expand Down Expand Up @@ -58,7 +60,7 @@ public class MinecraftClientMixin {
if (idString != null) {
uuid = idString;
}
return Optional.of(new Session(username, uuid, previous.getAccessToken(), previous.getXuid(), previous.getClientId(), previous.getAccountType()));
return Optional.of(new Session(username, UUID.fromString(uuid), previous.getAccessToken(), previous.getXuid(), previous.getClientId(), previous.getAccountType()));
}

return Optional.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public class MouseMixin {
locals = LocalCapture.CAPTURE_FAILEXCEPTION,
cancellable = true
)
private void jamlib$callMouseScrollEvent(long window, double scrollDeltaX, double scrollDeltaY, CallbackInfo ci, double amount) {
// private void jamlib$callMouseScrollEvent(long window, double scrollDeltaX, double scrollDeltaY, CallbackInfo ci, boolean ignored1, double ignored2, double ignored3, double amount) {
private void jamlib$callMouseScrollEvent(long window, double scrollDeltaX, double scrollDeltaY, CallbackInfo ci, boolean bl, double d, double e, double amount) {
double mouseX = this.x * (double) this.client.getWindow().getScaledWidth() / (double) this.client.getWindow().getWidth();
double mouseY = this.y * (double) this.client.getWindow().getScaledHeight() / (double) this.client.getWindow().getHeight();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import io.github.jamalam360.jamlib.config.JamLibConfig;
import io.github.jamalam360.jamlib.event.client.MouseScrollCallback;
import io.github.jamalam360.jamlib.keybind.JamLibKeybinds;
import io.github.jamalam360.jamlib.network.JamLibClientNetworking;
import java.util.Random;
Expand Down Expand Up @@ -61,6 +62,11 @@ public void onInitializeClient() {
JamLibTestNetwork.NETWORK_KEYBIND_PRESS_RESPONSE.setHandler(((client, handler, buf, responseSender) -> client.player.sendMessage(Text.literal("Response: " + buf.readInt()), false)));

JamLibClientNetworking.registerHandlers("jamlib-test");

MouseScrollCallback.EVENT.register(((mouseX, mouseY, amount) -> {
System.out.println("Mouse Scroll: " + mouseX + ", " + mouseY + ", " + amount);
return false;
}));
}

@Override
Expand Down
15 changes: 6 additions & 9 deletions versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[versions]
minecraft = "1.20-rc1"
quilt-mappings = "1.20-rc1+build.6"
fabric-loader = "0.14.21"
fabric-api = "0.83.0+1.20"
mod-menu = "7.0.0-beta.2"
lazy-dfu = "0.1.3"
minecraft = "1.20.2"
quilt-mappings = "1.20.2+build.2"
fabric-loader = "0.14.22"
fabric-api = "0.89.2+1.20.2"
mod-menu = "8.0.0"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
Expand All @@ -15,10 +14,8 @@ fabric-api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fab

mod-menu = { module = "com.terraformersmc:modmenu", version.ref = "mod-menu" }

lazy-dfu = { module = "maven.modrinth:lazydfu", version.ref = "lazy-dfu" }

[bundles]
fabric = ["fabric-loader", "fabric-api"]
required = []
optional = ["mod-menu"]
runtime = ["lazy-dfu"]
runtime = []

0 comments on commit e47bdeb

Please sign in to comment.