Upload magma
This commit is contained in:
commit
dfa9ee0b24
5008 changed files with 653442 additions and 0 deletions
88
fmlcore/build.gradle
Normal file
88
fmlcore/build.gradle
Normal file
|
@ -0,0 +1,88 @@
|
|||
plugins {
|
||||
id 'com.github.ben-manes.versions'
|
||||
id 'org.javamodularity.moduleplugin' version '1.8.3' apply false
|
||||
id 'org.cadixdev.licenser'
|
||||
}
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'org.javamodularity.moduleplugin'
|
||||
|
||||
dependencyUpdates.rejectVersionIf { isNonStable(it.candidate.version) }
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.jetbrains:annotations:${JETBRAINS_ANNOTATIONS_VERSION}")
|
||||
|
||||
api("net.minecraftforge:eventbus:${EVENTBUS_VERSION}")
|
||||
|
||||
implementation(project(':fmlloader'))
|
||||
implementation("commons-io:commons-io:${COMMONS_IO_VERSION}")
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
ext {
|
||||
MANIFESTS = [
|
||||
'': [
|
||||
'FMLModType': 'LIBRARY',
|
||||
'Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
'Git-Commit': GIT_INFO.abbreviatedId,
|
||||
'Git-Branch': GIT_INFO.branch,
|
||||
'Build-Number': "${System.getenv('BUILD_NUMBER')?:0}"
|
||||
] as LinkedHashMap,
|
||||
'net/minecraftforge/fml/loading/': [
|
||||
'Specification-Title': 'FMLLoader',
|
||||
'Specification-Vendor': 'Forge Development LLC',
|
||||
'Specification-Version': '1',
|
||||
'Implementation-Title': 'FML Loader',
|
||||
'Implementation-Version': '1.0',
|
||||
'Implementation-Vendor': 'Forge'
|
||||
] as LinkedHashMap,
|
||||
'org/magmafoundation/magma/': [
|
||||
'Specification-Title' : 'Magma Development Limited',
|
||||
'Specification-Vendor' : 'Magma Development Limited',
|
||||
'Implementation-Title' : "Magma",
|
||||
'Implementation-Version': MAGMA_VERSION + "-" + MCP_VERSION,
|
||||
'Implementation-Vendor' : 'Magma Development Limited',
|
||||
] as LinkedHashMap,
|
||||
'org/magmafoundation/magma/common/': [
|
||||
'Specification-Title' : 'Magma Development Limited',
|
||||
'Specification-Vendor' : 'Magma Development Limited',
|
||||
'Implementation-Title' : "Magma",
|
||||
'Implementation-Version': MAGMA_VERSION + "-" + MCP_VERSION,
|
||||
'Implementation-Vendor' : 'Magma Development Limited',
|
||||
] as LinkedHashMap
|
||||
]
|
||||
}
|
||||
|
||||
jar.doFirst {
|
||||
manifest.attributes['Automatic-Module-Name'] = project.name
|
||||
MANIFESTS.each { pkg, values ->
|
||||
if (pkg == '')
|
||||
manifest.attributes(values)
|
||||
else
|
||||
manifest.attributes(values, pkg)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << '-Xlint:unchecked'
|
||||
}
|
||||
|
||||
license {
|
||||
header = rootProject.file('LICENSE-header.txt')
|
||||
|
||||
ext {
|
||||
year = new Date().format("yyyy")
|
||||
}
|
||||
|
||||
exclude 'net/minecraftforge/'
|
||||
exclude 'io/izzel'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives jar
|
||||
archives sourcesJar
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9
fmlcore/index.html
Normal file
9
fmlcore/index.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="src/">src/</a> 07-Oct-2023 14:12 -
|
||||
<a href="build.gradle">build.gradle</a> 07-Oct-2023 14:12 2887
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="210a923ecdf8db351bcabda0467e7fb1" data-cf-beacon='{"rayId":"85f014dc882550c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
8
fmlcore/src/index.html
Normal file
8
fmlcore/src/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="main/">main/</a> 07-Oct-2023 14:12 -
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="56d9fa618f5051a9af3b6a6f7e09c24f" data-cf-beacon='{"rayId":"85f01520bd0050c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
8
fmlcore/src/main/index.html
Normal file
8
fmlcore/src/main/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="java/">java/</a> 07-Oct-2023 14:12 -
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="0e11a31d581f16b6314ad8abe763bb04" data-cf-beacon='{"rayId":"85f015624ec950c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
10
fmlcore/src/main/java/index.html
Normal file
10
fmlcore/src/main/java/index.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="io/">io/</a> 07-Oct-2023 14:12 -
|
||||
<a href="net/">net/</a> 07-Oct-2023 14:12 -
|
||||
<a href="org/">org/</a> 07-Oct-2023 14:12 -
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="bdab4f09b68251d9e0269267f3e68d40" data-cf-beacon='{"rayId":"85f015981c1750c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
8
fmlcore/src/main/java/io/index.html
Normal file
8
fmlcore/src/main/java/io/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="izzel/">izzel/</a> 07-Oct-2023 14:12 -
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="bd61ea99834606c76c5b58352cf7ff76" data-cf-beacon='{"rayId":"85f015f88c6e50c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
490
fmlcore/src/main/java/io/izzel/arclight/api/Unsafe.java
Normal file
490
fmlcore/src/main/java/io/izzel/arclight/api/Unsafe.java
Normal file
|
@ -0,0 +1,490 @@
|
|||
package io.izzel.arclight.api;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class Unsafe {
|
||||
|
||||
private static final sun.misc.Unsafe unsafe;
|
||||
private static final MethodHandles.Lookup lookup;
|
||||
private static final MethodHandle defineClass;
|
||||
|
||||
static {
|
||||
try {
|
||||
Field theUnsafe = sun.misc.Unsafe.class.getDeclaredField("theUnsafe");
|
||||
theUnsafe.setAccessible(true);
|
||||
unsafe = (sun.misc.Unsafe) theUnsafe.get(null);
|
||||
Unsafe.ensureClassInitialized(MethodHandles.Lookup.class);
|
||||
Field field = MethodHandles.Lookup.class.getDeclaredField("IMPL_LOOKUP");
|
||||
Object base = unsafe.staticFieldBase(field);
|
||||
long offset = unsafe.staticFieldOffset(field);
|
||||
lookup = (MethodHandles.Lookup) unsafe.getObject(base, offset);
|
||||
MethodHandle mh;
|
||||
try {
|
||||
Method sunMisc = unsafe.getClass().getMethod("defineClass", String.class, byte[].class, int.class, int.class, ClassLoader.class, ProtectionDomain.class);
|
||||
mh = lookup.unreflect(sunMisc).bindTo(unsafe);
|
||||
} catch (Exception e) {
|
||||
Class<?> jdkInternalUnsafe = Class.forName("jdk.internal.misc.Unsafe");
|
||||
Field internalUnsafeField = jdkInternalUnsafe.getDeclaredField("theUnsafe");
|
||||
Object internalUnsafe = unsafe.getObject(unsafe.staticFieldBase(internalUnsafeField), unsafe.staticFieldOffset(internalUnsafeField));
|
||||
Method internalDefineClass = jdkInternalUnsafe.getMethod("defineClass", String.class, byte[].class, int.class, int.class, ClassLoader.class, ProtectionDomain.class);
|
||||
mh = lookup.unreflect(internalDefineClass).bindTo(internalUnsafe);
|
||||
}
|
||||
defineClass = Objects.requireNonNull(mh);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T getStatic(Class<?> cl, String name) {
|
||||
try {
|
||||
Unsafe.ensureClassInitialized(cl);
|
||||
Field field = cl.getDeclaredField(name);
|
||||
Object materialByNameBase = Unsafe.staticFieldBase(field);
|
||||
long materialByNameOffset = Unsafe.staticFieldOffset(field);
|
||||
return (T) Unsafe.getObject(materialByNameBase, materialByNameOffset);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static MethodHandles.Lookup lookup() {
|
||||
return lookup;
|
||||
}
|
||||
|
||||
public static sun.misc.Unsafe getUnsafe() {
|
||||
return unsafe;
|
||||
}
|
||||
|
||||
public static int getInt(Object o, long l) {
|
||||
return unsafe.getInt(o, l);
|
||||
}
|
||||
|
||||
public static void putInt(Object o, long l, int i) {
|
||||
unsafe.putInt(o, l, i);
|
||||
}
|
||||
|
||||
public static Object getObject(Object o, long l) {
|
||||
return unsafe.getObject(o, l);
|
||||
}
|
||||
|
||||
public static void putObject(Object o, long l, Object o1) {
|
||||
unsafe.putObject(o, l, o1);
|
||||
}
|
||||
|
||||
public static boolean getBoolean(Object o, long l) {
|
||||
return unsafe.getBoolean(o, l);
|
||||
}
|
||||
|
||||
public static void putBoolean(Object o, long l, boolean b) {
|
||||
unsafe.putBoolean(o, l, b);
|
||||
}
|
||||
|
||||
public static byte getByte(Object o, long l) {
|
||||
return unsafe.getByte(o, l);
|
||||
}
|
||||
|
||||
public static void putByte(Object o, long l, byte b) {
|
||||
unsafe.putByte(o, l, b);
|
||||
}
|
||||
|
||||
public static short getShort(Object o, long l) {
|
||||
return unsafe.getShort(o, l);
|
||||
}
|
||||
|
||||
public static void putShort(Object o, long l, short i) {
|
||||
unsafe.putShort(o, l, i);
|
||||
}
|
||||
|
||||
public static char getChar(Object o, long l) {
|
||||
return unsafe.getChar(o, l);
|
||||
}
|
||||
|
||||
public static void putChar(Object o, long l, char c) {
|
||||
unsafe.putChar(o, l, c);
|
||||
}
|
||||
|
||||
public static long getLong(Object o, long l) {
|
||||
return unsafe.getLong(o, l);
|
||||
}
|
||||
|
||||
public static void putLong(Object o, long l, long l1) {
|
||||
unsafe.putLong(o, l, l1);
|
||||
}
|
||||
|
||||
public static float getFloat(Object o, long l) {
|
||||
return unsafe.getFloat(o, l);
|
||||
}
|
||||
|
||||
public static void putFloat(Object o, long l, float v) {
|
||||
unsafe.putFloat(o, l, v);
|
||||
}
|
||||
|
||||
public static double getDouble(Object o, long l) {
|
||||
return unsafe.getDouble(o, l);
|
||||
}
|
||||
|
||||
public static void putDouble(Object o, long l, double v) {
|
||||
unsafe.putDouble(o, l, v);
|
||||
}
|
||||
|
||||
public static byte getByte(long l) {
|
||||
return unsafe.getByte(l);
|
||||
}
|
||||
|
||||
public static void putByte(long l, byte b) {
|
||||
unsafe.putByte(l, b);
|
||||
}
|
||||
|
||||
public static short getShort(long l) {
|
||||
return unsafe.getShort(l);
|
||||
}
|
||||
|
||||
public static void putShort(long l, short i) {
|
||||
unsafe.putShort(l, i);
|
||||
}
|
||||
|
||||
public static char getChar(long l) {
|
||||
return unsafe.getChar(l);
|
||||
}
|
||||
|
||||
public static void putChar(long l, char c) {
|
||||
unsafe.putChar(l, c);
|
||||
}
|
||||
|
||||
public static int getInt(long l) {
|
||||
return unsafe.getInt(l);
|
||||
}
|
||||
|
||||
public static void putInt(long l, int i) {
|
||||
unsafe.putInt(l, i);
|
||||
}
|
||||
|
||||
public static long getLong(long l) {
|
||||
return unsafe.getLong(l);
|
||||
}
|
||||
|
||||
public static void putLong(long l, long l1) {
|
||||
unsafe.putLong(l, l1);
|
||||
}
|
||||
|
||||
public static float getFloat(long l) {
|
||||
return unsafe.getFloat(l);
|
||||
}
|
||||
|
||||
public static void putFloat(long l, float v) {
|
||||
unsafe.putFloat(l, v);
|
||||
}
|
||||
|
||||
public static double getDouble(long l) {
|
||||
return unsafe.getDouble(l);
|
||||
}
|
||||
|
||||
public static void putDouble(long l, double v) {
|
||||
unsafe.putDouble(l, v);
|
||||
}
|
||||
|
||||
public static long getAddress(long l) {
|
||||
return unsafe.getAddress(l);
|
||||
}
|
||||
|
||||
public static void putAddress(long l, long l1) {
|
||||
unsafe.putAddress(l, l1);
|
||||
}
|
||||
|
||||
public static long allocateMemory(long l) {
|
||||
return unsafe.allocateMemory(l);
|
||||
}
|
||||
|
||||
public static long reallocateMemory(long l, long l1) {
|
||||
return unsafe.reallocateMemory(l, l1);
|
||||
}
|
||||
|
||||
public static void setMemory(Object o, long l, long l1, byte b) {
|
||||
unsafe.setMemory(o, l, l1, b);
|
||||
}
|
||||
|
||||
public static void setMemory(long l, long l1, byte b) {
|
||||
unsafe.setMemory(l, l1, b);
|
||||
}
|
||||
|
||||
public static void copyMemory(Object o, long l, Object o1, long l1, long l2) {
|
||||
unsafe.copyMemory(o, l, o1, l1, l2);
|
||||
}
|
||||
|
||||
public static void copyMemory(long l, long l1, long l2) {
|
||||
unsafe.copyMemory(l, l1, l2);
|
||||
}
|
||||
|
||||
public static void freeMemory(long l) {
|
||||
unsafe.freeMemory(l);
|
||||
}
|
||||
|
||||
public static long staticFieldOffset(Field field) {
|
||||
return unsafe.staticFieldOffset(field);
|
||||
}
|
||||
|
||||
public static long objectFieldOffset(Field field) {
|
||||
return unsafe.objectFieldOffset(field);
|
||||
}
|
||||
|
||||
public static Object staticFieldBase(Field field) {
|
||||
return unsafe.staticFieldBase(field);
|
||||
}
|
||||
|
||||
public static boolean shouldBeInitialized(Class<?> aClass) {
|
||||
return unsafe.shouldBeInitialized(aClass);
|
||||
}
|
||||
|
||||
public static void ensureClassInitialized(Class<?> aClass) {
|
||||
unsafe.ensureClassInitialized(aClass);
|
||||
}
|
||||
|
||||
public static int arrayBaseOffset(Class<?> aClass) {
|
||||
return unsafe.arrayBaseOffset(aClass);
|
||||
}
|
||||
|
||||
public static int arrayIndexScale(Class<?> aClass) {
|
||||
return unsafe.arrayIndexScale(aClass);
|
||||
}
|
||||
|
||||
public static int addressSize() {
|
||||
return unsafe.addressSize();
|
||||
}
|
||||
|
||||
public static int pageSize() {
|
||||
return unsafe.pageSize();
|
||||
}
|
||||
|
||||
public static Class<?> defineClass(String s, byte[] bytes, int i, int i1, ClassLoader classLoader, ProtectionDomain protectionDomain) {
|
||||
try {
|
||||
return (Class<?>) defineClass.invokeExact(s, bytes, i, i1, classLoader, protectionDomain);
|
||||
} catch (Throwable throwable) {
|
||||
throwException(throwable);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static final MethodHandle H_DEF_CLASS;
|
||||
|
||||
static {
|
||||
MethodHandle handle;
|
||||
try {
|
||||
handle = lookup().findStatic(ClassLoader.class, "defineClass0", MethodType.methodType(Class.class,
|
||||
ClassLoader.class, Class.class, String.class, byte[].class, int.class, int.class, ProtectionDomain.class,
|
||||
boolean.class, int.class, Object.class));
|
||||
} catch (Throwable t) {
|
||||
try {
|
||||
handle = MethodHandles.dropArguments(
|
||||
lookup().findVirtual(ClassLoader.class, "defineClassInternal", MethodType.methodType(Class.class,
|
||||
Class.class, String.class, byte[].class, ProtectionDomain.class, boolean.class, int.class, Object.class)),
|
||||
4, Arrays.asList(int.class, int.class));
|
||||
} catch (Throwable t2) {
|
||||
handle = null;
|
||||
}
|
||||
}
|
||||
H_DEF_CLASS = handle;
|
||||
}
|
||||
|
||||
public static Object allocateInstance(Class<?> aClass) throws InstantiationException {
|
||||
return unsafe.allocateInstance(aClass);
|
||||
}
|
||||
|
||||
public static void throwException(Throwable throwable) {
|
||||
unsafe.throwException(throwable);
|
||||
}
|
||||
|
||||
public static boolean compareAndSwapObject(Object o, long l, Object o1, Object o2) {
|
||||
return unsafe.compareAndSwapObject(o, l, o1, o2);
|
||||
}
|
||||
|
||||
public static boolean compareAndSwapInt(Object o, long l, int i, int i1) {
|
||||
return unsafe.compareAndSwapInt(o, l, i, i1);
|
||||
}
|
||||
|
||||
public static boolean compareAndSwapLong(Object o, long l, long l1, long l2) {
|
||||
return unsafe.compareAndSwapLong(o, l, l1, l2);
|
||||
}
|
||||
|
||||
public static Object getObjectVolatile(Object o, long l) {
|
||||
return unsafe.getObjectVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putObjectVolatile(Object o, long l, Object o1) {
|
||||
unsafe.putObjectVolatile(o, l, o1);
|
||||
}
|
||||
|
||||
public static int getIntVolatile(Object o, long l) {
|
||||
return unsafe.getIntVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putIntVolatile(Object o, long l, int i) {
|
||||
unsafe.putIntVolatile(o, l, i);
|
||||
}
|
||||
|
||||
public static boolean getBooleanVolatile(Object o, long l) {
|
||||
return unsafe.getBooleanVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putBooleanVolatile(Object o, long l, boolean b) {
|
||||
unsafe.putBooleanVolatile(o, l, b);
|
||||
}
|
||||
|
||||
public static byte getByteVolatile(Object o, long l) {
|
||||
return unsafe.getByteVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putByteVolatile(Object o, long l, byte b) {
|
||||
unsafe.putByteVolatile(o, l, b);
|
||||
}
|
||||
|
||||
public static short getShortVolatile(Object o, long l) {
|
||||
return unsafe.getShortVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putShortVolatile(Object o, long l, short i) {
|
||||
unsafe.putShortVolatile(o, l, i);
|
||||
}
|
||||
|
||||
public static char getCharVolatile(Object o, long l) {
|
||||
return unsafe.getCharVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putCharVolatile(Object o, long l, char c) {
|
||||
unsafe.putCharVolatile(o, l, c);
|
||||
}
|
||||
|
||||
public static long getLongVolatile(Object o, long l) {
|
||||
return unsafe.getLongVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putLongVolatile(Object o, long l, long l1) {
|
||||
unsafe.putLongVolatile(o, l, l1);
|
||||
}
|
||||
|
||||
public static float getFloatVolatile(Object o, long l) {
|
||||
return unsafe.getFloatVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putFloatVolatile(Object o, long l, float v) {
|
||||
unsafe.putFloatVolatile(o, l, v);
|
||||
}
|
||||
|
||||
public static double getDoubleVolatile(Object o, long l) {
|
||||
return unsafe.getDoubleVolatile(o, l);
|
||||
}
|
||||
|
||||
public static void putDoubleVolatile(Object o, long l, double v) {
|
||||
unsafe.putDoubleVolatile(o, l, v);
|
||||
}
|
||||
|
||||
public static void putOrderedObject(Object o, long l, Object o1) {
|
||||
unsafe.putOrderedObject(o, l, o1);
|
||||
}
|
||||
|
||||
public static void putOrderedInt(Object o, long l, int i) {
|
||||
unsafe.putOrderedInt(o, l, i);
|
||||
}
|
||||
|
||||
public static void putOrderedLong(Object o, long l, long l1) {
|
||||
unsafe.putOrderedLong(o, l, l1);
|
||||
}
|
||||
|
||||
public static void unpark(Object o) {
|
||||
unsafe.unpark(o);
|
||||
}
|
||||
|
||||
public static void park(boolean b, long l) {
|
||||
unsafe.park(b, l);
|
||||
}
|
||||
|
||||
public static int getLoadAverage(double[] doubles, int i) {
|
||||
return unsafe.getLoadAverage(doubles, i);
|
||||
}
|
||||
|
||||
public static int getAndAddInt(Object o, long l, int i) {
|
||||
return unsafe.getAndAddInt(o, l, i);
|
||||
}
|
||||
|
||||
public static long getAndAddLong(Object o, long l, long l1) {
|
||||
return unsafe.getAndAddLong(o, l, l1);
|
||||
}
|
||||
|
||||
public static int getAndSetInt(Object o, long l, int i) {
|
||||
return unsafe.getAndSetInt(o, l, i);
|
||||
}
|
||||
|
||||
public static long getAndSetLong(Object o, long l, long l1) {
|
||||
return unsafe.getAndSetLong(o, l, l1);
|
||||
}
|
||||
|
||||
public static Object getAndSetObject(Object o, long l, Object o1) {
|
||||
return unsafe.getAndSetObject(o, l, o1);
|
||||
}
|
||||
|
||||
public static void loadFence() {
|
||||
unsafe.loadFence();
|
||||
}
|
||||
|
||||
public static void storeFence() {
|
||||
unsafe.storeFence();
|
||||
}
|
||||
|
||||
public static void fullFence() {
|
||||
unsafe.fullFence();
|
||||
}
|
||||
|
||||
public static Class<?> getCallerClass() {
|
||||
return INSTANCE.getCallerClass();
|
||||
}
|
||||
|
||||
private static final CallerClass INSTANCE;
|
||||
|
||||
static {
|
||||
boolean securityManagerPresent = false;
|
||||
try {
|
||||
Class.forName("java.lang.SecurityManager");
|
||||
securityManagerPresent = true;
|
||||
} catch (Throwable ignored) {}
|
||||
if (securityManagerPresent) {
|
||||
INSTANCE = new SecurityManagerCallerClass();
|
||||
} else {
|
||||
INSTANCE = new StackWalkerCallerClassimplements();
|
||||
}
|
||||
}
|
||||
|
||||
private static class SecurityManagerCallerClass extends SecurityManager implements CallerClass {
|
||||
|
||||
@Override
|
||||
public Class<?>[] getClassContext() {
|
||||
return super.getClassContext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getCallerClass() {
|
||||
return super.getClassContext()[3];
|
||||
}
|
||||
}
|
||||
|
||||
private static class StackWalkerCallerClassimplements implements CallerClass {
|
||||
|
||||
private final StackWalker walker = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE);
|
||||
|
||||
@Override
|
||||
public Class<?> getCallerClass() {
|
||||
return walker.walk(s -> s.skip(3).findFirst().orElseThrow().getDeclaringClass());
|
||||
}
|
||||
}
|
||||
|
||||
private interface CallerClass {
|
||||
|
||||
Class<?> getCallerClass();
|
||||
}
|
||||
}
|
8
fmlcore/src/main/java/io/izzel/arclight/api/index.html
Normal file
8
fmlcore/src/main/java/io/izzel/arclight/api/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/izzel/arclight/api/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/izzel/arclight/api/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="Unsafe.java">Unsafe.java</a> 07-Oct-2023 14:12 14K
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="96c16a1745d4ccda58f6076af5cf5ca7" data-cf-beacon='{"rayId":"85f026954db41c5c","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
8
fmlcore/src/main/java/io/izzel/arclight/index.html
Normal file
8
fmlcore/src/main/java/io/izzel/arclight/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/izzel/arclight/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/izzel/arclight/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="api/">api/</a> 07-Oct-2023 14:12 -
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="d57eca4dc35b028f2dd3b02148c4c657" data-cf-beacon='{"rayId":"85f019792d9150c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
8
fmlcore/src/main/java/io/izzel/index.html
Normal file
8
fmlcore/src/main/java/io/izzel/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/izzel/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/fmlcore/src/main/java/io/izzel/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="arclight/">arclight/</a> 07-Oct-2023 14:12 -
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="9302e3d97443208bc24b6bedfb195fb6" data-cf-beacon='{"rayId":"85f016b588c450c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue