Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.swofty.type.skyblockgeneric.data.SkyBlockDatapoint;
import net.swofty.type.skyblockgeneric.entity.mob.BestiaryMob;
import net.swofty.type.generic.event.HypixelEventHandler;
import net.swofty.type.skyblockgeneric.entity.mob.MobType;
import net.swofty.type.skyblockgeneric.event.custom.BestiaryUpdateEvent;
import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bestiary.BestiaryCategories;
import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bestiary.BestiaryEntry;
Expand Down Expand Up @@ -119,6 +120,23 @@ public List<String> getMobDisplay(List<String> lore, int kills, BestiaryMob mob,
int maxBarLength = baseLoadingBar.length();
int formattingCodeLength = 4;

List<MobType> mobtypes = mob.getMobTypes();

if (mobtypes.size() == 1) {
lore.add("§7Mob Type: " + mobtypes.getFirst().getFullDisplayName());
lore.add("");
} else if (mobtypes.size() > 1) {
StringBuilder sb = new StringBuilder();
for (MobType mobType : mobtypes) {
sb.append(mobType.getFullDisplayName());
sb.append("§7, ");
}
sb.delete(sb.chars().sum() - 3, sb.chars().sum());

lore.add("§7Mob Types: " + sb);
lore.add("");
}

lore.add("§7" + bestiaryEntry.getDescription());
lore.add("");
lore.add("§7Kills: §a" + kills);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import net.minestom.server.entity.ai.GoalSelector;
import net.minestom.server.entity.ai.TargetSelector;
import net.minestom.server.entity.ai.target.LastEntityDamagerTarget;
import net.minestom.server.item.Material;
import net.minestom.server.utils.time.TimeUnit;
import net.swofty.commons.item.ItemType;
import net.swofty.commons.statistics.ItemStatistic;
Expand All @@ -27,9 +26,9 @@

import java.util.List;

public class MobEmeraldSlime extends BestiaryMob implements RegionPopulator {
public class MobEmeraldSlime_05 extends BestiaryMob implements RegionPopulator {

public MobEmeraldSlime() {
public MobEmeraldSlime_05() {
super(EntityType.SLIME);
}

Expand Down Expand Up @@ -110,7 +109,7 @@ public OtherLoot getOtherLoot() {

@Override
public List<MobType> getMobTypes() {
return List.of(MobType.UNDEAD);
return List.of(MobType.CUBIC);
}

@Override
Expand All @@ -125,12 +124,12 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "EMERALD_SLIME";
return "EMERALD_SLIME_05";
}

@Override
public GUIMaterial getGuiMaterial() {
return new GUIMaterial(Material.SLIME_BLOCK); // todo: find real material
return new GUIMaterial("895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns;

import net.swofty.commons.statistics.ItemStatistic;
import net.swofty.commons.statistics.ItemStatistics;
import net.swofty.type.skyblockgeneric.loottable.OtherLoot;

public class MobEmeraldSlime_10 extends MobEmeraldSlime_05 {
@Override
public Integer getLevel() {
return 10;
}

@Override
public ItemStatistics getBaseStatistics() {
return ItemStatistics.builder()
.withBase(ItemStatistic.HEALTH, 150D)
.withBase(ItemStatistic.DAMAGE, 100D)
.withBase(ItemStatistic.SPEED, 100D)
.build();
}

@Override
public OtherLoot getOtherLoot() {
return new OtherLoot(15, 8, 30);
}

@Override
public String getMobID() {
return "EMERALD_SLIME_10";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

import java.util.List;

public class MobMinerSkeleton extends BestiaryMob implements RegionPopulator {
public class MobMinerSkeleton_15 extends BestiaryMob implements RegionPopulator {

public MobMinerSkeleton() {
public MobMinerSkeleton_15() {
super(EntityType.SKELETON);
}

Expand Down Expand Up @@ -118,7 +118,7 @@ public OtherLoot getOtherLoot() {

@Override
public List<MobType> getMobTypes() {
return List.of(MobType.UNDEAD);
return List.of(MobType.SKELETAL);
}

@Override
Expand All @@ -133,12 +133,12 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "DIAMOND_SKELETON";
return "DIAMOND_SKELETON_15";
}

@Override
public GUIMaterial getGuiMaterial() {
return new GUIMaterial(Material.SKELETON_SKULL); // todo: find real material
return new GUIMaterial("8de8bbd7f6d77a1614865ef6a1d31f53f797550d14ee21d107a8415c14b48ca6");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns;

import net.swofty.commons.statistics.ItemStatistic;
import net.swofty.commons.statistics.ItemStatistics;
import net.swofty.type.skyblockgeneric.loottable.OtherLoot;

public class MobMinerSkeleton_20 extends MobMinerSkeleton_15 {
@Override
public Integer getLevel() {
return 20;
}

@Override
public ItemStatistics getBaseStatistics() {
return ItemStatistics.builder()
.withBase(ItemStatistic.HEALTH, 300D)
.withBase(ItemStatistic.DAMAGE, 200D)
.withBase(ItemStatistic.SPEED, 100D)
.build();
}

@Override
public OtherLoot getOtherLoot() {
return new OtherLoot(24, 15, 40);
}

@Override
public String getMobID() {
return "DIAMOND_SKELETON_20";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

import java.util.List;

public class MobMinerZombie extends BestiaryMob implements RegionPopulator {
public class MobMinerZombie_15 extends BestiaryMob implements RegionPopulator {

public MobMinerZombie() {
public MobMinerZombie_15() {
super(EntityType.ZOMBIE);
}

Expand Down Expand Up @@ -139,12 +139,12 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "DIAMOND_ZOMBIE";
return "DIAMOND_ZOMBIE_15";
}

@Override
public GUIMaterial getGuiMaterial() {
return new GUIMaterial(Material.ZOMBIE_HEAD); // todo: find real material
return new GUIMaterial("1b8a707e8a58d2ffe297474d18daee86951b21994566358dc0b5d7dcc9e2ed9b");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns;

import net.swofty.commons.statistics.ItemStatistic;
import net.swofty.commons.statistics.ItemStatistics;
import net.swofty.type.skyblockgeneric.loottable.OtherLoot;

public class MobMinerZombie_20 extends MobMinerZombie_15 {
@Override
public Integer getLevel() {
return 20;
}

@Override
public ItemStatistics getBaseStatistics() {
return ItemStatistics.builder()
.withBase(ItemStatistic.HEALTH, 300D)
.withBase(ItemStatistic.DAMAGE, 250D)
.withBase(ItemStatistic.SPEED, 100D)
.build();
}

@Override
public OtherLoot getOtherLoot() {
return new OtherLoot(24, 15, 40);
}

@Override
public String getMobID() {
return "DIAMOND_ZOMBIE_20";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public String getMobID() {

@Override
public GUIMaterial getGuiMaterial() {
return new GUIMaterial(Material.ZOMBIFIED_PIGLIN_SPAWN_EGG); // todo: find real material
return new GUIMaterial("74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public OtherLoot getOtherLoot() {

@Override
public List<MobType> getMobTypes() {
return List.of(MobType.UNDEAD);
return List.of(MobType.CUBIC);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "1_graveyard_zombie";
return "GRAVEYARD_ZOMBIE";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "1_graveyard_zombie_villager";
return "ZOMBIE_VILLIGER";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "50_ruins_old_wolf";
return "OLD_WOLF";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "15_ruins_wolf";
return "RUIN_WOLF";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import java.util.Arrays;
import java.util.List;

public class MobZombie_1 extends BestiaryMob implements RegionPopulator {
public class MobZombie_01 extends BestiaryMob implements RegionPopulator {

public MobZombie_1() {
public MobZombie_01() {
super(EntityType.ZOMBIE);
}

Expand Down Expand Up @@ -117,7 +117,7 @@ public int getBestiaryBracket() {

@Override
public String getMobID() {
return "1_zombie";
return "ZOMBIE_01";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package net.swofty.type.skyblockgeneric.entity.mob.mobs.island;

public class MobZombie_2 extends MobZombie_1 {
public class MobZombie_02 extends MobZombie_01 {
@Override
public Integer getLevel() {
return 2;
}

@Override
public String getMobID() {
return "2_zombie";
return "ZOMBIE_02";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
@Getter
public enum BestiaryCategories {
YOUR_ISLAND("§aYour island", BestiaryCategory.PRIVATE_ISLAND.values()),
HUB("§aHub", BestiaryCategory.HUB.values())
HUB("§aHub", BestiaryCategory.HUB.values()),
DEEP_CAVERNS("§bDeep Caverns", BestiaryCategory.DEEP_CAVERNS.values()),
;

private final String displayName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import net.minestom.server.item.Material;
import net.swofty.type.generic.gui.inventory.item.GUIMaterial;
import net.swofty.type.skyblockgeneric.entity.mob.BestiaryMob;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns.*;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.hub.MobGraveyardZombie;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.hub.MobGraveyardZombieVillager;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.hub.MobRuinsOldWolf;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.hub.MobRuinsWolf;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.island.MobZombie_1;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.island.MobZombie_2;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.island.MobZombie_01;
import net.swofty.type.skyblockgeneric.entity.mob.mobs.island.MobZombie_02;

import java.util.List;

Expand All @@ -18,7 +19,7 @@ public enum BestiaryCategory {

@Getter
public enum PRIVATE_ISLAND implements BestiaryEntry {
ZOMBIE("§aZombie", "Brains.", new GUIMaterial(Material.ZOMBIE_HEAD), List.of(new MobZombie_1(), new MobZombie_2())),
ZOMBIE("§aZombie", "Brains.", new GUIMaterial(Material.ZOMBIE_HEAD), List.of(new MobZombie_01(), new MobZombie_02())),
;

private final String name, description;
Expand Down Expand Up @@ -52,4 +53,32 @@ public enum HUB implements BestiaryEntry {
this.mobs = mobs;
}
}

@Getter
public enum DEEP_CAVERNS implements BestiaryEntry {
EMERALD_SLIME("§aEmerald Slime", "It is said that these slimes absorb emeralds to grow larger.",
new GUIMaterial("895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c"), List.of(new MobEmeraldSlime_05(), new MobEmeraldSlime_10())),
LAPIS_ZOMBIE("§aLapis Zombie", "These zombies adapted to their environment, using the lapis around them as a defense mechanism.",
new GUIMaterial("e9f7979b25001087969d58c06e14d00b8dab57dab060b4c8b483c1b7f869940"), List.of(new MobLapisZombie())),
MINER_SKELETON("§aMiner Skeleton", "These skeletons have crafted gear from the diamonds around them - resulting in a look both fashionable and protective.",
new GUIMaterial("8de8bbd7f6d77a1614865ef6a1d31f53f797550d14ee21d107a8415c14b48ca6"), List.of(new MobMinerSkeleton_15(), new MobMinerSkeleton_20())),
MINER_ZOMBIE("§aMiner Zombie", "Like their skeleton counterparts, these zombies have bedazzled themselves throughout the years.",
new GUIMaterial("1b8a707e8a58d2ffe297474d18daee86951b21994566358dc0b5d7dcc9e2ed9b"), List.of(new MobMinerZombie_15(), new MobMinerZombie_20())),
REDSTONE_PIGMAN("§aRedstone Pigman", "These pigmen will defend their redstone to the death.",
new GUIMaterial("74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb"), List.of(new MobRedstonePigman())),
SNEAKY_CREEPER("§aSneaky Creeper", "They be creepin'.",
new GUIMaterial("74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb"), List.of(new MobSneakyCreeper())),
;

private final String name, description;
private final GUIMaterial guiMaterial;
private final List<BestiaryMob> mobs;

DEEP_CAVERNS(String name, String description, GUIMaterial guiMaterial, List<BestiaryMob> mobs) {
this.name = name;
this.description = description;
this.guiMaterial = guiMaterial;
this.mobs = mobs;
}
}
}
Loading