Skip to content

Commit

Permalink
Add LanguageAdapter.getDefault()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIIL committed Oct 22, 2023
1 parent f8769ba commit 3cae8dc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ group = org.quiltmc
description = The mod loading component of Quilt
url = https://github.com/quiltmc/quilt-loader
# Don't forget to change this in QuiltLoaderImpl as well
quilt_loader = 0.21.1
quilt_loader = 0.21.2-beta.1

# Fabric & Quilt Libraries
asm = 9.5
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/quiltmc/loader/api/LanguageAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.quiltmc.loader.api;

import org.quiltmc.loader.impl.util.DefaultLanguageAdapter;

/**
* Creates instances of objects from custom notations.
*
Expand Down Expand Up @@ -95,6 +97,15 @@
* </ul>
*/
public interface LanguageAdapter {

/** Returns the default language adapter. Most mods will have no use for this method - instead it is intended for
* other {@link LanguageAdapter}s to fallback to the default behaviour.
*
* @return The default language adapter. */
public static LanguageAdapter getDefault() {
return DefaultLanguageAdapter.INSTANCE;
}

/**
* Creates an object of {@code type} from an arbitrary string declaration.
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public final class QuiltLoaderImpl {

public static final int ASM_VERSION = Opcodes.ASM9;

public static final String VERSION = "0.21.1";
public static final String VERSION = "0.21.2-beta.1";
public static final String MOD_ID = "quilt_loader";
public static final String DEFAULT_MODS_DIR = "mods";
public static final String DEFAULT_CACHE_DIR = ".cache";
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/changelog/0.21.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Features:

- Added LanguageAdapter.getDefault(), to allow other LanguageAdapters to use it as their fallback.

0 comments on commit 3cae8dc

Please sign in to comment.