Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Jan 20, 2024
1 parent 96afae7 commit 2338e88
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/java/gregtech/api/GTValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
import net.minecraftforge.oredict.OreDictionary;

import org.jetbrains.annotations.ApiStatus;

import java.time.LocalDate;
import java.util.Random;
import java.util.function.Supplier;
Expand Down Expand Up @@ -124,7 +126,9 @@ public class GTValues {
*/
public static final String MODID = "gregtech";

/** @deprecated Use {@link gregtech.api.util.Mods} instead */
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.9")
public static final String MODID_FR = "forestry",
MODID_CT = "crafttweaker",
MODID_TOP = "theoneprobe",
Expand Down
32 changes: 30 additions & 2 deletions src/main/java/gregtech/integration/IntegrationUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand All @@ -21,7 +22,13 @@
@Deprecated
public class IntegrationUtil {

/** Should only be called after {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent} */
/**
* Should only be called after {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent}
*
* @deprecated Use {@link gregtech.api.util.Mods} instead for these features.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.9")
public static void throwIncompatibilityIfLoaded(String modID, String... customMessages) {
if (Loader.isModLoaded(modID)) {
String modName = TextFormatting.BOLD + modID + TextFormatting.RESET;
Expand All @@ -32,7 +39,13 @@ public static void throwIncompatibilityIfLoaded(String modID, String... customMe
}
}

/** Should only be called after {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent} */
/**
* Should only be called after {@link net.minecraftforge.fml.common.event.FMLPreInitializationEvent}
*
* @deprecated Use {@link gregtech.api.util.Mods} instead for these features.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.9")
public static void throwIncompatibility(List<String> messages) {
if (FMLLaunchHandler.side() == Side.SERVER) {
throw new RuntimeException(String.join(",", messages));
Expand All @@ -41,16 +54,31 @@ public static void throwIncompatibility(List<String> messages) {
}
}

/**
* @deprecated Use {@link gregtech.api.util.Mods} instead for these features.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.9")
@NotNull
public static ItemStack getModItem(@NotNull String modid, @NotNull String name, int meta) {
return getModItem(modid, name, meta, 1, null);
}

/**
* @deprecated Use {@link gregtech.api.util.Mods} instead for these features.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.9")
@NotNull
public static ItemStack getModItem(@NotNull String modid, @NotNull String name, int meta, int amount) {
return getModItem(modid, name, meta, amount, null);
}

/**
* @deprecated Use {@link gregtech.api.util.Mods} instead for these features.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2.9")
@NotNull
public static ItemStack getModItem(@NotNull String modid, @NotNull String name, int meta, int amount,
@Nullable String nbt) {
Expand Down

0 comments on commit 2338e88

Please sign in to comment.