Skip to content

Commit e75a5a7

Browse files
authored
Merge pull request #583 from ItzKatze/master
some bestiary work
2 parents dd8602a + 418c9f3 commit e75a5a7

19 files changed

Lines changed: 195 additions & 32 deletions

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/data/datapoints/DatapointBestiary.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import net.swofty.type.skyblockgeneric.data.SkyBlockDatapoint;
1010
import net.swofty.type.skyblockgeneric.entity.mob.BestiaryMob;
1111
import net.swofty.type.generic.event.HypixelEventHandler;
12+
import net.swofty.type.skyblockgeneric.entity.mob.MobType;
1213
import net.swofty.type.skyblockgeneric.event.custom.BestiaryUpdateEvent;
1314
import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bestiary.BestiaryCategories;
1415
import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bestiary.BestiaryEntry;
@@ -119,6 +120,23 @@ public List<String> getMobDisplay(List<String> lore, int kills, BestiaryMob mob,
119120
int maxBarLength = baseLoadingBar.length();
120121
int formattingCodeLength = 4;
121122

123+
List<MobType> mobtypes = mob.getMobTypes();
124+
125+
if (mobtypes.size() == 1) {
126+
lore.add("§7Mob Type: " + mobtypes.getFirst().getFullDisplayName());
127+
lore.add("");
128+
} else if (mobtypes.size() > 1) {
129+
StringBuilder sb = new StringBuilder();
130+
for (MobType mobType : mobtypes) {
131+
sb.append(mobType.getFullDisplayName());
132+
sb.append("§7, ");
133+
}
134+
sb.delete(sb.chars().sum() - 3, sb.chars().sum());
135+
136+
lore.add("§7Mob Types: " + sb);
137+
lore.add("");
138+
}
139+
122140
lore.add("§7" + bestiaryEntry.getDescription());
123141
lore.add("");
124142
lore.add("§7Kills: §a" + kills);

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobEmeraldSlime.java renamed to type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobEmeraldSlime_05.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import net.minestom.server.entity.ai.GoalSelector;
66
import net.minestom.server.entity.ai.TargetSelector;
77
import net.minestom.server.entity.ai.target.LastEntityDamagerTarget;
8-
import net.minestom.server.item.Material;
98
import net.minestom.server.utils.time.TimeUnit;
109
import net.swofty.commons.item.ItemType;
1110
import net.swofty.commons.statistics.ItemStatistic;
@@ -27,9 +26,9 @@
2726

2827
import java.util.List;
2928

30-
public class MobEmeraldSlime extends BestiaryMob implements RegionPopulator {
29+
public class MobEmeraldSlime_05 extends BestiaryMob implements RegionPopulator {
3130

32-
public MobEmeraldSlime() {
31+
public MobEmeraldSlime_05() {
3332
super(EntityType.SLIME);
3433
}
3534

@@ -110,7 +109,7 @@ public OtherLoot getOtherLoot() {
110109

111110
@Override
112111
public List<MobType> getMobTypes() {
113-
return List.of(MobType.UNDEAD);
112+
return List.of(MobType.CUBIC);
114113
}
115114

116115
@Override
@@ -125,12 +124,12 @@ public int getBestiaryBracket() {
125124

126125
@Override
127126
public String getMobID() {
128-
return "EMERALD_SLIME";
127+
return "EMERALD_SLIME_05";
129128
}
130129

131130
@Override
132131
public GUIMaterial getGuiMaterial() {
133-
return new GUIMaterial(Material.SLIME_BLOCK); // todo: find real material
132+
return new GUIMaterial("895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c");
134133
}
135134

136135
@Override
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns;
2+
3+
import net.swofty.commons.statistics.ItemStatistic;
4+
import net.swofty.commons.statistics.ItemStatistics;
5+
import net.swofty.type.skyblockgeneric.loottable.OtherLoot;
6+
7+
public class MobEmeraldSlime_10 extends MobEmeraldSlime_05 {
8+
@Override
9+
public Integer getLevel() {
10+
return 10;
11+
}
12+
13+
@Override
14+
public ItemStatistics getBaseStatistics() {
15+
return ItemStatistics.builder()
16+
.withBase(ItemStatistic.HEALTH, 150D)
17+
.withBase(ItemStatistic.DAMAGE, 100D)
18+
.withBase(ItemStatistic.SPEED, 100D)
19+
.build();
20+
}
21+
22+
@Override
23+
public OtherLoot getOtherLoot() {
24+
return new OtherLoot(15, 8, 30);
25+
}
26+
27+
@Override
28+
public String getMobID() {
29+
return "EMERALD_SLIME_10";
30+
}
31+
}

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobMinerSkeleton.java renamed to type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobMinerSkeleton_15.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
import java.util.List;
2828

29-
public class MobMinerSkeleton extends BestiaryMob implements RegionPopulator {
29+
public class MobMinerSkeleton_15 extends BestiaryMob implements RegionPopulator {
3030

31-
public MobMinerSkeleton() {
31+
public MobMinerSkeleton_15() {
3232
super(EntityType.SKELETON);
3333
}
3434

@@ -118,7 +118,7 @@ public OtherLoot getOtherLoot() {
118118

119119
@Override
120120
public List<MobType> getMobTypes() {
121-
return List.of(MobType.UNDEAD);
121+
return List.of(MobType.SKELETAL);
122122
}
123123

124124
@Override
@@ -133,12 +133,12 @@ public int getBestiaryBracket() {
133133

134134
@Override
135135
public String getMobID() {
136-
return "DIAMOND_SKELETON";
136+
return "DIAMOND_SKELETON_15";
137137
}
138138

139139
@Override
140140
public GUIMaterial getGuiMaterial() {
141-
return new GUIMaterial(Material.SKELETON_SKULL); // todo: find real material
141+
return new GUIMaterial("8de8bbd7f6d77a1614865ef6a1d31f53f797550d14ee21d107a8415c14b48ca6");
142142
}
143143

144144
@Override
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns;
2+
3+
import net.swofty.commons.statistics.ItemStatistic;
4+
import net.swofty.commons.statistics.ItemStatistics;
5+
import net.swofty.type.skyblockgeneric.loottable.OtherLoot;
6+
7+
public class MobMinerSkeleton_20 extends MobMinerSkeleton_15 {
8+
@Override
9+
public Integer getLevel() {
10+
return 20;
11+
}
12+
13+
@Override
14+
public ItemStatistics getBaseStatistics() {
15+
return ItemStatistics.builder()
16+
.withBase(ItemStatistic.HEALTH, 300D)
17+
.withBase(ItemStatistic.DAMAGE, 200D)
18+
.withBase(ItemStatistic.SPEED, 100D)
19+
.build();
20+
}
21+
22+
@Override
23+
public OtherLoot getOtherLoot() {
24+
return new OtherLoot(24, 15, 40);
25+
}
26+
27+
@Override
28+
public String getMobID() {
29+
return "DIAMOND_SKELETON_20";
30+
}
31+
}

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobMinerZombie.java renamed to type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobMinerZombie_15.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929
import java.util.List;
3030

31-
public class MobMinerZombie extends BestiaryMob implements RegionPopulator {
31+
public class MobMinerZombie_15 extends BestiaryMob implements RegionPopulator {
3232

33-
public MobMinerZombie() {
33+
public MobMinerZombie_15() {
3434
super(EntityType.ZOMBIE);
3535
}
3636

@@ -139,12 +139,12 @@ public int getBestiaryBracket() {
139139

140140
@Override
141141
public String getMobID() {
142-
return "DIAMOND_ZOMBIE";
142+
return "DIAMOND_ZOMBIE_15";
143143
}
144144

145145
@Override
146146
public GUIMaterial getGuiMaterial() {
147-
return new GUIMaterial(Material.ZOMBIE_HEAD); // todo: find real material
147+
return new GUIMaterial("1b8a707e8a58d2ffe297474d18daee86951b21994566358dc0b5d7dcc9e2ed9b");
148148
}
149149

150150
@Override
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package net.swofty.type.skyblockgeneric.entity.mob.mobs.deepcaverns;
2+
3+
import net.swofty.commons.statistics.ItemStatistic;
4+
import net.swofty.commons.statistics.ItemStatistics;
5+
import net.swofty.type.skyblockgeneric.loottable.OtherLoot;
6+
7+
public class MobMinerZombie_20 extends MobMinerZombie_15 {
8+
@Override
9+
public Integer getLevel() {
10+
return 20;
11+
}
12+
13+
@Override
14+
public ItemStatistics getBaseStatistics() {
15+
return ItemStatistics.builder()
16+
.withBase(ItemStatistic.HEALTH, 300D)
17+
.withBase(ItemStatistic.DAMAGE, 250D)
18+
.withBase(ItemStatistic.SPEED, 100D)
19+
.build();
20+
}
21+
22+
@Override
23+
public OtherLoot getOtherLoot() {
24+
return new OtherLoot(24, 15, 40);
25+
}
26+
27+
@Override
28+
public String getMobID() {
29+
return "DIAMOND_ZOMBIE_20";
30+
}
31+
}

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobRedstonePigman.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public String getMobID() {
132132

133133
@Override
134134
public GUIMaterial getGuiMaterial() {
135-
return new GUIMaterial(Material.ZOMBIFIED_PIGLIN_SPAWN_EGG); // todo: find real material
135+
return new GUIMaterial("74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb");
136136
}
137137

138138
@Override

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/deepcaverns/MobSneakyCreeper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public OtherLoot getOtherLoot() {
109109

110110
@Override
111111
public List<MobType> getMobTypes() {
112-
return List.of(MobType.UNDEAD);
112+
return List.of(MobType.CUBIC);
113113
}
114114

115115
@Override

type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/entity/mob/mobs/hub/MobGraveyardZombie.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public int getBestiaryBracket() {
124124

125125
@Override
126126
public String getMobID() {
127-
return "1_graveyard_zombie";
127+
return "GRAVEYARD_ZOMBIE";
128128
}
129129

130130
@Override

0 commit comments

Comments
 (0)