Skip to content

Commit

Permalink
Update to 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shurik204 committed Oct 22, 2024
1 parent 3247d65 commit e5d2ffc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
25 changes: 12 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

plugins {
id("fabric-loom") version "1.6-SNAPSHOT" // Fabric Loom
id("fabric-loom") version "1.8-SNAPSHOT" // Fabric Loom
id("io.github.p03w.machete") version "1.1.4" // Build jar compression
id("me.modmuss50.mod-publish-plugin") version "0.4.5" // Mod publishing

Expand Down Expand Up @@ -55,12 +55,13 @@ dependencies {
mappings(loom.layered {
officialMojangMappings()

if (parchmentVersion.contains(":"))
// Use exact version
parchment("org.parchmentmc.data:parchment-${parchmentVersion}@zip")
else
// Use minecraft version + given date
parchment("org.parchmentmc.data:parchment-${minecraftVersion}:${parchmentVersion}@zip")
if (hasProperty("parchmentVersion"))
if (parchmentVersion.contains(":"))
// Use exact version
parchment("org.parchmentmc.data:parchment-${parchmentVersion}@zip")
else
// Use minecraft version + given date
parchment("org.parchmentmc.data:parchment-${minecraftVersion}:${parchmentVersion}@zip")
})
modImplementation("net.fabricmc:fabric-loader:${loaderVersion}")

Expand All @@ -78,6 +79,7 @@ dependencies {
// YAML support
include(implementation("org.snakeyaml:snakeyaml-engine:${property("deps.snakeyaml")}")) {}

compileOnly("com.google.code.findbugs:jsr305:3.0.2")
compileOnly("org.eclipse.jdt:org.eclipse.jdt.annotation:${property("deps.jdtAnnotation")}")
}

Expand Down Expand Up @@ -163,12 +165,9 @@ tasks {
}

// Fix machete compression
getAllTasks(true).forEach {
for (task in it.value) {
// All publishing tasks depend on the remapJar task. But also metadata generation.
if (task.name.startsWith("publish") || task.name == "generateMetadataFileForJarPublication") {
task.dependsOn("optimizeOutputsOfRemapJar")
}
configureEach {
if (name.startsWith("publish") || name == "generateMetadataFileForJarPublication") {
dependsOn("optimizeOutputsOfRemapJar")
}
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx2G

# Main properties
mod.java=21
mod.minecraft=1.21
mod.loader=0.15.11
mod.parchment=1.20.6:2024.05.01
mod.minecraft=1.21.2
mod.loader=0.16.7
mod.parchment=1.21:2024.07.28

# Mod properties
mod.group=me.shurik
Expand All @@ -15,7 +15,7 @@ mod.description=Improved syntax highlighting for Minecraft commands with theme s


# Dependencies
deps.fabricApi=0.100.3+1.21
deps.fabricApi=0.106.1+1.21.2
# TM4E
deps.tm4e=0.12.1-SNAPSHOT
deps.joni=2.2.1
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ResourceLocation getFabricId() {
}

@Override
public CompletableFuture<Void> reload(PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) {
public CompletableFuture<Void> reload(PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor backgroundExecutor, Executor gameExecutor) {
// How to handle different file types?
// 0. Only support one format
// 1. Priority: .tmlanguage > .tmlanguage.json > .tmlanguage.yaml > .tmlanguage.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static boolean renderScopes(GuiGraphics guiGraphics, int mouseX, int mous
List<Component> tooltipLines = Lists.newArrayList(Component.literal(padded.substring(token.getStartIndex(), token.getEndIndex()).replace(' ', '·')));
tooltipLines.add(Component.literal("------------"));
tooltipLines.add(Component.literal("Scopes:").withStyle(ChatFormatting.AQUA));
for (String scope : token.getScopes()) {
for (String scope : token.getScopes().reversed()) {
tooltipLines.add(Component.literal(scope));
}
StyleAttributes style = Styler.getTextMateStyle(token);
Expand Down

0 comments on commit e5d2ffc

Please sign in to comment.