Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with Fabric Loader 0.16.2 #448

Merged
merged 9 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ quilt_loader = 0.26.4-beta.1

# Fabric & Quilt Libraries
asm = 9.6
sponge_mixin = 0.13.3+mixin.0.8.5
sponge_mixin = 0.15.2+mixin.0.8.7
tiny_mappings_parser = 0.3.0+build.17
tiny_remapper = 0.10.1
tiny_remapper = 0.10.4
access_widener = 2.1.0
quilt_json5 = 1.0.4+final
quilt_parsers = 0.2.0
Expand All @@ -27,4 +27,4 @@ junit_bom = 5.9.3
proguard_gradle = 7.4.2
github_api = 1.315
flexver = 1.1.0
mixin_extras = 0.3.5
mixin_extras = 0.4.1
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-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ protected static String getRelease(String version) {
int year = Integer.parseInt(matcher.group(1));
int week = Integer.parseInt(matcher.group(2));

if (year >= 24 && week >= 18) {
if (year >= 24 && week >= 33) {
return "1.21.2";
} else if (year == 24 && week >= 18 && week <= 21) {
return "1.21";
} else if (year == 23 && week >= 51 || year == 24 && week <= 14) {
return "1.20.5";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ public interface EntrypointContainer<T> {
* Returns the mod that provided this entrypoint.
*/
ModContainer getProvider();

/**
* Returns a string representation of the entrypoint's definition.
*/
default String getDefinition() {
return "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ public T getEntrypoint() {
public ModContainer getProvider() {
return new ModContainerImpl(quilt.getProvider());
}

@Override
public String getDefinition() {
return quilt.getDefinition();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,11 @@ public interface EntrypointContainer<T> {
* Returns the mod that provided this entrypoint.
*/
ModContainer getProvider();

/**
* Returns a string representation of the entrypoint's definition.
*/
default String getDefinition() {
return "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ interface Entry {
boolean isOptional();

ModContainerExt getModContainer();

String getDefinition();
}

@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -87,6 +89,11 @@ public boolean isOptional() {
public ModContainerExt getModContainer() {
return mod;
}

@Override
public String getDefinition() {
return value;
}
}

private static final class NewEntry implements Entry {
Expand Down Expand Up @@ -131,6 +138,11 @@ public boolean isOptional() {
public ModContainerExt getModContainer() {
return mod;
}

@Override
public String getDefinition() {
return value;
}
}

private final Map<String, List<Entry>> entryMap = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ private static <T> void invoke0(String name, Class<T> type, Consumer<EntrypointC
} catch (Throwable t) {
exception = ExceptionUtil.gatherExceptions(t,
exception,
exc -> new RuntimeException(String.format("Could not execute entrypoint stage '%s' due to errors, provided by '%s'!",
name, container.getProvider().metadata().id()),
exc -> new RuntimeException(String.format("Could not execute entrypoint stage '%s' due to errors, provided by '%s' at '%s'!",
name, container.getProvider().metadata().id(), container.getDefinition()),
exc));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static final class MixinConfigDecorator {
// maximum loader version and bundled fabric mixin version, DESCENDING ORDER, LATEST FIRST
// loader versions with new mixin versions need to be added here

// addVersion("0.13", FabricUtil.COMPATIBILITY_0_11_0); // example for next entry (latest first!)
addVersion("0.16.0", FabricUtil.COMPATIBILITY_0_14_0);
addVersion("0.12.0-", FabricUtil.COMPATIBILITY_0_10_0);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,15 @@ public ClassNode getClassNode(String name) throws ClassNotFoundException, IOExce

@Override
public ClassNode getClassNode(String name, boolean runTransformers) throws ClassNotFoundException, IOException {
return getClassNode(name, runTransformers, 0);
}

@Override
public ClassNode getClassNode(String name, boolean runTransformers, int readerFlags) throws ClassNotFoundException, IOException {
ClassReader reader = new ClassReader(getClassBytes(name, runTransformers));
ClassNode node = new ClassNode();
reader.accept(node, 0);
reader.accept(node, readerFlags);
AlexIIL marked this conversation as resolved.
Show resolved Hide resolved
return node;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"provides": [
{
"id": "fabricloader",
"version": "0.15.11"
"version": "0.16.2"
}
],
"depends": [
Expand Down
Loading