Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove BOP Message on First World Creation #290

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/main/java/com/mitchej123/hodgepodge/Compat.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class Compat {
private static boolean isRailcraftPresent;

private static boolean isGalacticraftPresent;
private static boolean isBiomesOPlentyPresent;

static void init(Side side) {
isClient = side == Side.CLIENT;
Expand Down Expand Up @@ -52,6 +53,8 @@ static void init(Side side) {
isRailcraftPresent = Loader.isModLoaded("Railcraft");

isGalacticraftPresent = Loader.isModLoaded("GalacticraftCore");

isBiomesOPlentyPresent = Loader.isModLoaded("BiomesOPlenty");
}

/**
Expand Down Expand Up @@ -105,4 +108,11 @@ public static boolean isRailcraftPresent() {
public static boolean isGalacticraftPresent() {
return isGalacticraftPresent;
}

/**
* Cannot be used before pre-init phase.
*/
public static boolean isBiomesOPlentyPresent() {
return isBiomesOPlentyPresent;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.mitchej123.hodgepodge.client.handlers.ClientKeyListener;
import com.mitchej123.hodgepodge.util.ManagedEnum;

import biomesoplenty.common.eventhandler.client.gui.WorldTypeMessageEventHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModMetadata;
Expand Down Expand Up @@ -67,6 +68,11 @@ public static void postInit() {
meta.description = "This IC2 Addon allows you to simulate the CropBreeding.";
meta.autogenerated = false;
}

if (Compat.isBiomesOPlentyPresent()) {
// removes the popup that BOP shows on first world gen
bombcar marked this conversation as resolved.
Show resolved Hide resolved
MinecraftForge.EVENT_BUS.unregister(WorldTypeMessageEventHandler.instance);
glowredman marked this conversation as resolved.
Show resolved Hide resolved
}
}

public enum AnimationMode {
Expand Down