Skip to content

Commit

Permalink
⬆️ Update to 1.21.1, use EXT2 file system & UI redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Nov 29, 2024
1 parent 037bf32 commit b4da684
Show file tree
Hide file tree
Showing 300 changed files with 8,266 additions and 5,131 deletions.
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/discord.xml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ultreon Devices Mod [![CircleCI](https://dl.circleci.com/status-badge/img/gh/Ultreon/devices-mod/tree/1.19.3-development.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Ultreon/devices-mod/tree/1.19.3-development)
**Language:** Java
**Minecraft Version:** `1.19.3`, `1.20.1`
**Mod Loader:** [Forge](https://files.minecraftforge.net/), [NeoForge](https://neoforged.net/), [Fabric](https://fabricmc.net/)
**Mod Loader:** [Forge](https://maven.neoforged.net/releases/), [NeoForge](https://neoforged.net/), [Fabric](https://fabricmc.net/)
**Download:** [[CurseForge]](https://curseforge.com/minecraft/mc-mods/devices-mod), [[CurseForge Legacy]](https://legacy.curseforge.com/minecraft/mc-mods/devices-mod), [[Modrinth]](https://modrinth.com/mod/devices-mod)

*Fork of [MrCrayfish's Device Mod](https://github.com/MrCrayfish/MrCrayfishDeviceMod)*
Expand Down
18 changes: 14 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "org.jetbrains.kotlin.jvm" version "1.7.10"
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}
repositories {
gradlePluginPortal()
Expand Down Expand Up @@ -55,13 +56,20 @@ subprojects {
url 'https://maven.quiltmc.org/repository/release/'
}


maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}

maven {
url "https://jitpack.io"
content {
includeGroup "com.github.Nuix"
}
}

maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
Expand All @@ -75,9 +83,11 @@ subprojects {
// The following line declares the mojmap mappings, you may use other mappings as well
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.20.1:2023.09.03@zip")
parchment("org.parchmentmc.data:parchment-1.21.1:2024.11.17@zip")
}

implementation 'com.github.Nuix:jnode-fs:v1.0.1'

// layered
// The following line declares the yarn mappings you may select this one as well.
// mappings "net.fabricmc:yarn:@YARN_MAPPINGS@:v2"
Expand Down Expand Up @@ -106,7 +116,7 @@ allprojects {

tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release.set(17)
options.release.set(21)
}

java {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
package com.jab125.classloader.impl;

import com.ultreon.devices.Devices;
import com.ultreon.devices.core.Device;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.impl.FabricLoaderImpl;
import net.fabricmc.loader.impl.launch.FabricLauncher;
import net.fabricmc.loader.impl.launch.knot.Knot;
import net.fabricmc.loader.launch.common.FabricLauncherBase;
import net.fabricmc.tinyremapper.TinyRemapper;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import org.spongepowered.asm.util.asm.ASM;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.SecureClassLoader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
Expand Down
108 changes: 45 additions & 63 deletions common/src/main/java/com/jab125/version/SemanticVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,87 +18,69 @@

import java.util.Optional;

/**
* Represents a <a href="https://semver.org/">Sematic Version</a>.
*
* <p>Compared to a regular {@link Version}, this type of version receives better support
* for version comparisons in dependency notations, and is preferred.</p>
*
* @see Version
*/
/// Represents a <a href="https://semver.org/">Sematic Version</a>.
///
/// Compared to a regular [Version], this type of version receives better support
/// for version comparisons in dependency notations, and is preferred.
///
/// @see Version
public interface SemanticVersion extends Version {
/**
* The value of {@linkplain #getVersionComponent(int) version component} that indicates
* a {@linkplain #hasWildcard() wildcard}.
*/
/// The value of {@linkplain #getVersionComponent(int) version component} that indicates
/// a {@linkplain #hasWildcard() wildcard}.
int COMPONENT_WILDCARD = Integer.MIN_VALUE;

/**
* Returns the number of components in this version.
*
* <p>For example, {@code 1.3.x} has 3 components.</p>
*
* @return the number of components
*/
/// Returns the number of components in this version.
///
/// For example, `1.3.x` has 3 components.
///
/// @return the number of components
int getVersionComponentCount();

/**
* Returns the version component at {@code pos}.
*
* <p>May return {@link #COMPONENT_WILDCARD} to indicate a wildcard component.</p>
*
* <p>If the pos exceeds the number of components, returns {@link #COMPONENT_WILDCARD}
* if the version {@linkplain #hasWildcard() has wildcard}; otherwise returns {@code 0}.</p>
*
* @param pos the position to check
* @return the version component
*/
/// Returns the version component at `pos`.
///
/// May return [#COMPONENT_WILDCARD] to indicate a wildcard component.
///
/// If the pos exceeds the number of components, returns [#COMPONENT_WILDCARD]
/// if the version {@linkplain #hasWildcard() has wildcard}; otherwise returns `0`.
///
/// @param pos the position to check
/// @return the version component
int getVersionComponent(int pos);

/**
* Returns the prerelease key in the version notation.
*
* <p>The prerelease key is indicated by a {@code -} before a {@code +} in
* the version notation.</p>
*
* @return the optional prerelease key
*/
/// Returns the prerelease key in the version notation.
///
/// The prerelease key is indicated by a `-` before a `+` in
/// the version notation.
///
/// @return the optional prerelease key
Optional<String> getPrereleaseKey();

/**
* Returns the build key in the version notation.
*
* <p>The build key is indicated by a {@code +} in the version notation.</p>
*
* @return the optional build key
*/
/// Returns the build key in the version notation.
///
/// The build key is indicated by a `+` in the version notation.
///
/// @return the optional build key
Optional<String> getBuildKey();

/**
* Returns if a wildcard notation is present in this version.
*
* <p>A wildcard notation is a {@code x}, {@code X}, or {@code *} in the version string,
* such as {@code 2.5.*}.</p>
*
* @return whether this version has a wildcard notation
*/
/// Returns if a wildcard notation is present in this version.
///
/// A wildcard notation is a `x`, `X`, or `*` in the version string,
/// such as `2.5.*`.
///
/// @return whether this version has a wildcard notation
boolean hasWildcard();

/**
* @deprecated Use {@link #compareTo(Version)} instead
*/
/// @deprecated Use [#compareTo(Version)] instead
@Deprecated
default int compareTo(SemanticVersion o) {
return compareTo((Version) o);
}

/**
* Parses a semantic version from a string notation.
*
* @param s the string notation of the version
* @return the parsed version
* @throws VersionParsingException if a problem arises during version parsing
*/
/// Parses a semantic version from a string notation.
///
/// @param s the string notation of the version
/// @return the parsed version
/// @throws VersionParsingException if a problem arises during version parsing
static SemanticVersion parse(String s) throws VersionParsingException {
return VersionParser.parseSemantic(s);
}
Expand Down
20 changes: 10 additions & 10 deletions common/src/main/java/com/jab125/version/SemanticVersionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@

package com.jab125.version;

import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
import java.util.StringTokenizer;
import java.util.regex.Pattern;

/**
* Parser for a superset of the semantic version format described at <a href="https://semver.org">semver.org</a>.
*
* <p>This superset allows additionally
* <ul><li>Arbitrary number of {@code <version core>} components, but at least 1
* <li>{@code x}, {@code X} or {@code *} for the last {@code <version core>} component with {@code storeX} if not the first
* <li>Arbitrary {@code <build>} contents
* </ul>
*/
/// Parser for a superset of the semantic version format described at <a href="https://semver.org">semver.org</a>.
///
/// This superset allows additionally
/// - Arbitrary number of `<version core>` components, but at least 1
/// - `x`, `X` or `*` for the last `<version core>` component with `storeX` if not the first
/// - Arbitrary `<build>` contents
///
@SuppressWarnings("deprecation")
public class SemanticVersionImpl implements SemanticVersion {
private static final Pattern DOT_SEPARATED_ID = Pattern.compile("|[-0-9A-Za-z]+(\\.[-0-9A-Za-z]+)*");
Expand Down Expand Up @@ -246,7 +246,7 @@ public boolean equalsComponentsExactly(SemanticVersionImpl other) {
}

@Override
public int compareTo(Version other) {
public int compareTo(@NotNull Version other) {
if (!(other instanceof SemanticVersion)) {
return getFriendlyString().compareTo(other.getFriendlyString());
}
Expand Down
16 changes: 6 additions & 10 deletions common/src/main/java/com/jab125/version/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,14 @@
package com.jab125.version;

public interface Version extends Comparable<Version> {
/**
* Returns the user-friendly representation of this version.
*/
/// Returns the user-friendly representation of this version.
String getFriendlyString();

/**
* Parses a version from a string notation.
*
* @param string the string notation of the version
* @return the parsed version
* @throws VersionParsingException if a problem arises during version parsing
*/
/// Parses a version from a string notation.
///
/// @param string the string notation of the version
/// @return the parsed version
/// @throws VersionParsingException if a problem arises during version parsing
static Version parse(String string) throws VersionParsingException {
return VersionParser.parse(string, false);
}
Expand Down
Loading

0 comments on commit b4da684

Please sign in to comment.