summaryrefslogtreecommitdiffstats
path: root/forge
diff options
context:
space:
mode:
authorAizistral2023-05-17 12:38:49 +0200
committerAizistral2023-05-17 12:38:49 +0200
commit4bfec9b41d9dc9ec4db3b0de1f8f90544096c65e (patch)
treedce13858a8317072ea6415ee158f97e9077568f6 /forge
parente0016d8fe011bcf358ebb9b470fe708a5a6664a8 (diff)
Move fabric annotations into a dependency
Fixes #389
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle1
-rw-r--r--forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0-sources.jarbin0 -> 2472 bytes
-rw-r--r--forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.jarbin0 -> 1463 bytes
-rw-r--r--forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.pom9
-rw-r--r--forge/src/main/java/net/fabricmc/api/EnvType.java48
-rw-r--r--forge/src/main/java/net/fabricmc/api/Environment.java48
6 files changed, 10 insertions, 96 deletions
diff --git a/forge/build.gradle b/forge/build.gradle
index 4d6a08c..6c0edb0 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle
@@ -124,6 +124,7 @@ dependencies {
// Minecraft & Forge
minecraft "net.minecraftforge:forge:${forge_version}"
implementation "generic:modmenu:5.0.2"
+ implementation "generic:fabric-annotations:v1.0.0"
implementation fg.deobf("me.shedaniel.cloth:cloth-config-forge:" + rootProject.cloth_config_version)
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
}
diff --git a/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0-sources.jar b/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0-sources.jar
new file mode 100644
index 0000000..bc0c0f1
--- /dev/null
+++ b/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0-sources.jar
Binary files differ
diff --git a/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.jar b/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.jar
new file mode 100644
index 0000000..6dd30fc
--- /dev/null
+++ b/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.jar
Binary files differ
diff --git a/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.pom b/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.pom
new file mode 100644
index 0000000..0d68c4c
--- /dev/null
+++ b/forge/deps/generic/fabric-annotations/v1.0.0/fabric-annotations-v1.0.0.pom
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>generic</groupId>
+ <artifactId>fabric-annotations</artifactId>
+ <version>v1.0.0</version>
+ <dependencies></dependencies>
+</project>
diff --git a/forge/src/main/java/net/fabricmc/api/EnvType.java b/forge/src/main/java/net/fabricmc/api/EnvType.java
deleted file mode 100644
index 253b6e8..0000000
--- a/forge/src/main/java/net/fabricmc/api/EnvType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2016 FabricMC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.fabricmc.api;
-
-/**
- * Represents a type of environment.
- *
- * <p>A type of environment is a jar file in a <i>Minecraft</i> version's json file's {@code download}
- * subsection, including the {@code client.jar} and the {@code server.jar}.</p>
- *
- * @see Environment
- * @see EnvironmentInterface
- */
-public enum EnvType {
- /**
- * Represents the client environment type, in which the {@code client.jar} for a
- * <i>Minecraft</i> version is the main game jar.
- *
- * <p>A client environment type has all client logic (client rendering and integrated
- * server logic), the data generator logic, and dedicated server logic. It encompasses
- * everything that is available on the {@linkplain #SERVER server environment type}.</p>
- */
- CLIENT,
- /**
- * Represents the server environment type, in which the {@code server.jar} for a
- * <i>Minecraft</i> version is the main game jar.
- *
- * <p>A server environment type has the dedicated server logic and data generator
- * logic, which are all included in the {@linkplain #CLIENT client environment type}.
- * However, the server environment type has its libraries embedded compared to the
- * client.</p>
- */
- SERVER
-}
diff --git a/forge/src/main/java/net/fabricmc/api/Environment.java b/forge/src/main/java/net/fabricmc/api/Environment.java
deleted file mode 100644
index 1db59da..0000000
--- a/forge/src/main/java/net/fabricmc/api/Environment.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2016 FabricMC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.fabricmc.api;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Applied to declare that the annotated element is present only in the specified environment.
- *
- * <p>Use with caution, as Fabric-loader will remove the annotated element in a mismatched environment!</p>
- *
- * <p>When the annotated element is removed, bytecode associated with the element will not be removed.
- * For example, if a field is removed, its initializer code will not, and will cause an error on execution.</p>
- *
- * <p>If an overriding method has this annotation and its overridden method doesn't,
- * unexpected behavior may happen. If an overridden method has this annotation
- * while the overriding method doesn't, it is safe, but the method can be used from
- * the overridden class only in the specified environment.</p>
- *
- * @see EnvironmentInterface
- */
-@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PACKAGE})
-@Documented
-public @interface Environment {
- /**
- * Returns the environment type that the annotated element is only present in.
- */
- EnvType value();
-}