mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 16:09:24 +00:00
Updated how mythic mob fetcher works
This commit is contained in:
@@ -27,22 +27,24 @@ public class BossEntityUtils {
|
|||||||
*/
|
*/
|
||||||
public static BossType getBossType(@NotNull String id) {
|
public static BossType getBossType(@NotNull String id) {
|
||||||
|
|
||||||
if (mythicMobs && id.startsWith("mythicmobs_")) {
|
if (id.startsWith("mythicmobs_")) {
|
||||||
int level;
|
if (mythicMobs) {
|
||||||
|
int level;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
level = Integer.parseInt(Arrays.stream(id.split("_")).toList().get(id.split("_").length-1));
|
level = Integer.parseInt(Arrays.stream(id.split("_")).toList().get(id.split("_").length-1));
|
||||||
} catch (NumberFormatException exception) {
|
} catch (NumberFormatException exception) {
|
||||||
level = 1;
|
level = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
MythicMob mob = MythicMobs.inst().getMobManager().getMythicMob(id.replace("mythicmobs_", "").replace("_"+level, ""));
|
MythicMob mob = MythicMobs.inst().getMobManager().getMythicMob(id.replace("mythicmobs_", "").replace("_"+level, ""));
|
||||||
|
|
||||||
if (mob != null) {
|
if (mob != null) {
|
||||||
return new MythicMobsBossType(mob, level);
|
return new MythicMobsBossType(mob, level);
|
||||||
}
|
}
|
||||||
|
else id = "zombie";
|
||||||
|
} else id = "zombie";
|
||||||
|
|
||||||
else id = "zombie";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ api-version: 1.16
|
|||||||
authors: [Auxilor]
|
authors: [Auxilor]
|
||||||
website: willfp.com
|
website: willfp.com
|
||||||
load: STARTUP
|
load: STARTUP
|
||||||
|
softdepend:
|
||||||
|
- MythicMobs
|
||||||
|
- LevelledMobs
|
||||||
depend:
|
depend:
|
||||||
- eco
|
- eco
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user