Skip to content

Commit

Permalink
Port to Minecraft 1.19 (#146)
Browse files Browse the repository at this point in the history
- Upgrade to Minecraft 1.19
- Upgrade to Fabric Loom 0.12
- Upgrade to Fabric Loader 0.14.6
- Upgrade to Yarn Mappings 1.19+build.1
- Upgrade to Fabric API 0.55.2+1.19
- Swap "new LiteralText()" for "Text.literal()" as is required by the new 1.19 API
- Remove deprecated minecraft function from build.gradle
  • Loading branch information
DarkWav authored Jun 19, 2022
1 parent 1c5ca5e commit 2e0bed3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}

Expand All @@ -10,8 +10,6 @@ archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

minecraft {
}

dependencies {
//to change the versions see the gradle.properties file
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ org.gradle.jvmargs=-Xmx1G
# To remap the mixin locations:
# gradlew migrateMappings --mappings "1.16.1+build.9"

minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.12.8
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6

#Fabric api
fabric_version=0.44.0+1.18
fabric_version=0.55.2+1.19

# Mod Properties
mod_version = 1.18-fabric-2
mod_version = 1.19-fabric-1
maven_group = net.torocraft
archives_base_name = torohealth
archives_base_name = torohealth
4 changes: 2 additions & 2 deletions src/main/java/net/torocraft/torohealth/display/Hud.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.text.LiteralText;
import net.minecraft.text.*;
import net.minecraft.util.Identifier;
import net.torocraft.torohealth.ToroHealth;
import net.torocraft.torohealth.config.Config;
Expand All @@ -21,7 +21,7 @@ public class Hud extends Screen {
private int age;

public Hud() {
super(new LiteralText("ToroHealth HUD"));
super(Text.literal("ToroHealth HUD"));
this.client = MinecraftClient.getInstance();
barDisplay = new BarDisplay(MinecraftClient.getInstance(), this);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"modmenu": "*"
},
"depends": {
"fabricloader": ">=0.11.3",
"fabricloader": ">=0.14.6",
"fabric": "*",
"minecraft": "1.18.x",
"minecraft": "1.19.x",
"java": ">=17"
}
}
}

0 comments on commit 2e0bed3

Please sign in to comment.