This commit is contained in:
mmarc471@gmail.com
2020-08-24 20:36:27 +02:00
parent 33cbd045b3
commit cbc3199c17
11723 changed files with 725043 additions and 276 deletions
@@ -0,0 +1,26 @@
package mcp;
import javax.annotation.Nonnull;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.annotation.meta.TypeQualifierDefault;
/**
* This annotation can be applied to a package, class or method to indicate that
* the method in that element are nonnull by default unless there is:
* <ul>
* <li>An explicit nullness annotation
* <li>The method overrides a method in a superclass (in which case the
* annotation of the corresponding method in the superclass applies)
* <li> there is a default parameter annotation applied to a more tightly nested
* element.
* </ul>
*
*/
@Documented
@Nonnull
@TypeQualifierDefault(ElementType.METHOD) // Note: This is a copy of javax.annotation.ParametersAreNonnullByDefault with target changed to METHOD
@Retention(RetentionPolicy.RUNTIME)
public @interface MethodsReturnNonnullByDefault {}
@@ -0,0 +1,26 @@
package mcp.client;
import java.util.Arrays;
import net.minecraft.client.main.Main;
public class Start
{
public static void main(String[] args)
{
/*
* start minecraft game application
* --version is just used as 'launched version' in snoop data and is required
* Working directory is used as gameDir if not provided
*/
String assets = System.getenv().containsKey("assetDirectory") ? System.getenv("assetDirectory") : "assets";
Main.main(concat(new String[]{"--version", "mcp", "--accessToken", "0", "--assetsDir", assets, "--assetIndex", "1.16", "--userProperties", "{}"}, args));
}
public static <T> T[] concat(T[] first, T[] second)
{
T[] result = Arrays.copyOf(first, first.length + second.length);
System.arraycopy(second, 0, result, first.length, second.length);
return result;
}
}