Skip to content

Commit

Permalink
Update to 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Oct 22, 2024
1 parent 76efcb7 commit 64d72a3
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
}

architectury {
common("fabric"/*, "forge", "neoforge"*/)
common("fabric", "neoforge"/*, "forge", "neoforge"*/)
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,13 @@ public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
}
Rectangle slideArrowBounds = new Rectangle(sliderPosition - 14, 0, 14, height);
{
graphics.drawSpecial(source -> {
font.renderText(">", sliderPosition - 7 - font.width(">") / 2f, height / 2, (slideArrowBounds.contains(mouseX, mouseY) ? 16777120 : 16777215) | Mth.clamp(Mth.ceil((1 - sideSlider.scrollAmount()) * 255.0F), 0, 255) << 24, false, graphics.pose().last().pose(), source, Font.DisplayMode.NORMAL, 0, 15728880);
font.renderText("<", sliderPosition - 7 - font.width("<") / 2f, height / 2, (slideArrowBounds.contains(mouseX, mouseY) ? 16777120 : 16777215) | Mth.clamp(Mth.ceil(sideSlider.scrollAmount() * 255.0F), 0, 255) << 24, false, graphics.pose().last().pose(), source, Font.DisplayMode.NORMAL, 0, 15728880);
});
int textColor = slideArrowBounds.contains(mouseX, mouseY) ? 16777120 : 16777215;
if (Mth.ceil((1 - sideSlider.scrollAmount()) * 255.0F) >= 10) {
graphics.drawString(font, ">", Math.round(sliderPosition - 7 - font.width(">") / 2f), height / 2, textColor | Mth.clamp(Mth.ceil((1 - sideSlider.scrollAmount()) * 255.0F), 0, 255) << 24);
}
if (Mth.ceil(sideSlider.scrollAmount() * 255.0F) >= 10) {
graphics.drawString(font, "<", Math.round(sliderPosition - 7 - font.width("<") / 2f), height / 2, textColor | Mth.clamp(Mth.ceil(sideSlider.scrollAmount() * 255.0F), 0, 255) << 24);
}

Rectangle scrollerBounds = sideScroller.getBounds();
if (!scrollerBounds.isEmpty()) {
Expand Down
1 change: 0 additions & 1 deletion common/src/main/resources/cloth-config.accessWidener
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
accessWidener v1 named
accessible method net/minecraft/client/gui/Font renderText (Ljava/lang/String;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/client/gui/Font$DisplayMode;II)F
accessible field net/minecraft/client/gui/components/Button onPress Lnet/minecraft/client/gui/components/Button$OnPress;
mutable field net/minecraft/client/gui/components/Button onPress Lnet/minecraft/client/gui/components/Button$OnPress;
accessible field net/minecraft/client/KeyMapping key Lcom/mojang/blaze3d/platform/InputConstants$Key;
4 changes: 2 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ publishing {
unifiedPublishing {
project {
displayName = "[Fabric $rootProject.supported_version] v$project.version"
releaseType = "beta"
releaseType = "release"
gameVersions = []
gameLoaders = ["fabric"]

Expand All @@ -121,7 +121,7 @@ unifiedPublishing {
curseforge {
token = project.hasProperty("curse_api_key") ? project.property("curse_api_key") : System.getenv("curse_api_key")
id = project.curseforge_id
gameVersions.addAll "1.21.2-Snapshot", "Java 21"
gameVersions.addAll "1.21.2-Snapshot", "Java 21", "1.21.2"
}
}

Expand Down
1 change: 0 additions & 1 deletion fabric/src/main/resources/cloth-config.accessWidener
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
accessWidener v1 named
accessible method net/minecraft/client/gui/Font renderText (Ljava/lang/String;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/client/gui/Font$DisplayMode;II)F
accessible field net/minecraft/client/gui/components/Button onPress Lnet/minecraft/client/gui/components/Button$OnPress;
mutable field net/minecraft/client/gui/components/Button onPress Lnet/minecraft/client/gui/components/Button$OnPress;
accessible field net/minecraft/client/KeyMapping key Lcom/mojang/blaze3d/platform/InputConstants$Key;
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

minecraft_version=24w36a
supported_version=1.21.2 (24w36a)
minecraft_version=1.21.2
supported_version=1.21.2

archives_base_name=cloth-config
archives_base_name_snapshot=cloth-config-snapshot
Expand All @@ -13,12 +13,12 @@ jankson_version=1.2.0
toml4j_version=0.7.2
snakeyaml_version=1.27

fabric_loader_version=0.16.5
fabric_api_version=0.103.2+1.21.2
mod_menu_version=12.0.0-alpha.1
fabric_loader_version=0.16.7
fabric_api_version=0.106.1+1.21.2
mod_menu_version=12.0.0-beta.1

forge_version=51.0.33
neoforge_version=21.0.167
neoforge_version=21.2.0-beta
neoforge_pr=

curseforge_id=348521
Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ unifiedPublishing {
project {
displayName = "[NeoForge $rootProject.supported_version] v$project.version"
releaseType = "release"
gameVersions = ["1.21"]
gameVersions = ["1.21.2"]
gameLoaders = ["neoforge"]

mainPublication remapJar
Expand Down
2 changes: 0 additions & 2 deletions neoforge/src/main/resources/META-INF/accesstransformer.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Font.renderText
public net.minecraft.client.gui.Font renderText(Ljava/lang/String;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/client/gui/Font$DisplayMode;II)F # renderText
# Button.onPress
public-f net.minecraft.client.gui.components.Button onPress # onPress
# KeyMapping.key
Expand Down
2 changes: 1 addition & 1 deletion neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ An API for config screens.
[[dependencies.cloth_config]]
modId = "neoforge"
type = "required"
versionRange = "[21.0.110-beta,)"
versionRange = "[21.2.0-beta,)"
ordering = "NONE"
side = "BOTH"
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if (JavaVersion.current().ordinal() + 1 < 21) {
include("common")
include("fabric")
//include("forge")
//include("neoforge")
include("neoforge")

rootProject.name = 'cloth-config'

0 comments on commit 64d72a3

Please sign in to comment.