Skip to content

Commit

Permalink
Update to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceitem committed Dec 1, 2021
1 parent d68f2c1 commit 00fc733
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 34 deletions.
27 changes: 5 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"


// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
}

processResources {
Expand All @@ -30,14 +25,8 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
it.options.release = 17
}

java {
Expand All @@ -57,13 +46,7 @@ jar {
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17
yarn_mappings=1.17+build.5
minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.11.3
# Mod Properties
mod_version=0.2.4
mod_version=0.2.5
maven_group=symbol-chat
archives_base_name=symbol-chat

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
tab.getRight().render(matrices,mouseX,mouseY,delta);
}
for(Pair<SymbolTab,SymbolButtonWidget> tab : tabs) {
tab.getRight().renderToolTip(matrices,mouseX,mouseY);
tab.getRight().renderTooltip(matrices,mouseX,mouseY);
}
getSymbolTab(selectedTab).render(matrices,mouseX,mouseY,delta);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Text getMessage() {

@Override
public void appendNarrations(NarrationMessageBuilder builder) {
this.method_37021(builder);
this.appendDefaultNarrations(builder);
builder.put(NarrationPart.HINT, "Dropdown element: " + element.toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void onSelection(int index, T element) {}

@Override
public void appendNarrations(NarrationMessageBuilder builder) {
this.method_37021(builder);
this.appendDefaultNarrations(builder);
builder.put(NarrationPart.HINT, "Dropdown: " + getSelection().toString());
}
public T getSelection() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public boolean isHovered() {
}

@Override
public void renderToolTip(MatrixStack matrices, int mouseX, int mouseY) {
public void renderTooltip(MatrixStack matrices, int mouseX, int mouseY) {
if(this.isMouseOver(mouseX,mouseY)) screen.renderTooltip(matrices,tooltip,mouseX,mouseY);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float del

@Override
public void appendNarrations(NarrationMessageBuilder builder) {
this.method_37021(builder);
this.appendDefaultNarrations(builder);
builder.put(NarrationPart.HINT, "Symbol chat button");
}
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
],
"depends": {
"fabricloader": ">=0.11.3",
"minecraft": "1.17.x"
"minecraft": "1.18.x"
}
}
2 changes: 1 addition & 1 deletion src/main/resources/symbol-chat.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "symbolchat.symbolchat.mixin",
"compatibilityLevel": "JAVA_16",
"compatibilityLevel": "JAVA_17",
"mixins": [
"AnonymousChatTextFieldWidgetMixin",
"AnvilScreenMixin",
Expand Down

0 comments on commit 00fc733

Please sign in to comment.