Skip to content

Commit 105da7a

Browse files
Merge pull request #495 from ItzKatze/master
feat: Bestiary
2 parents f4ee17d + a391f24 commit 105da7a

62 files changed

Lines changed: 1895 additions & 209 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ A video of me going through the guide [can be found here](https://www.youtube.co
7777
4. Once this has finished, you should have a resource pack in the output directory you specified. Merely apply this on Minecraft and you'll be good to go.
7878

7979

80-
# 🐋 Running with Docker
80+
## 🐋 Running with Docker
8181
- Install the git repository using `git clone https://github.com/Swofty-Developments/HypixelSkyBlock.git
8282

8383
Most parts about downloading and setting up files will be automated for you but you will need to add the following files to the `configuration` folder:
@@ -135,16 +135,28 @@ or go to the `exec` tab in Docker Desktop.
135135
and then run the service command inside there. It will create its own screen session for you to run the service in.
136136

137137

138-
### Common Issues
138+
## Common Issues
139139
1. `redis.clients.jedis.exceptions.JedisConnectionException: Failed to connect to any host resolved for DNS name.`
140140

141141
=> Your Memurai isn't running.
142142
2. `Preview features are not enabled for... Try running with '--enable-preview'`
143143

144144
=> try `java --enable-preview -jar SkyBlockCore.jar {ServerType}`
145+
3. Having issues connecting to the server?
146+
147+
=> Check if your velocity secret is the same everywhere including the limbo config.
148+
149+
4. `You have strayed too far from the spawn! Teleporting you back...` when joining an island?
150+
151+
=> You didn't import your regions (correctly).
152+
153+
5. Still having issues?
154+
155+
=> Make sure that you followed everything correctly. If that didn't help, join our discord and ask for help in #code-help. Please provide screenshots of all your consoles!
156+
### Pinging staff members won't solve your issue faster!
145157

146158
## Credits
147159

148160
Thanks to:
149161
* All the lovely people in the Minestom discord for single-handedly carrying all of my knowledge about this API.
150-
* Myself and any other contributors, which can be viewed on this Git page.
162+
* Myself and any other contributors, who can be viewed [HERE](https://github.com/Swofty-Developments/HypixelSkyBlock/graphs/contributors).

commons/src/main/java/net/swofty/commons/StringUtility.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
66
import net.minestom.server.instance.block.Block;
77
import net.minestom.server.item.Material;
8+
import net.swofty.commons.statistics.ItemStatistic;
89

910
import java.math.RoundingMode;
1011
import java.text.DecimalFormat;
@@ -275,4 +276,25 @@ public static String ntify(int i) {
275276
};
276277
};
277278
}
279+
280+
public static String getFormatedStatistic(ItemStatistic statistic) {
281+
return statistic.getDisplayColor() + statistic.getSymbol() + " " + statistic.getDisplayName();
282+
}
283+
284+
public static List<String> centerLines(List<String> lines) {
285+
int maxLength = lines.stream()
286+
.map(StringUtility::stripColor)
287+
.mapToInt(String::length)
288+
.max()
289+
.orElse(0);
290+
291+
List<String> centered = new ArrayList<>();
292+
for (String line : lines) {
293+
String stripped = stripColor(line);
294+
int padding = Math.max(0, (maxLength - stripped.length()) / 2);
295+
centered.add(" ".repeat(padding) + line);
296+
}
297+
298+
return centered;
299+
}
278300
}

configuration/collections/mining.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ collections:
302302
- type: XP
303303
data:
304304
xp: 4
305+
- type: CUSTOM_AWARD
306+
data:
307+
customAward: LOOTING_DISCOUNT
305308
- amount: 500
306309
rewards:
307310
- type: XP

configuration/items/vanillaItems.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5094,6 +5094,8 @@ items:
50945094
result:
50955095
type: DIAMOND_SWORD
50965096
amount: 1
5097+
- id: STANDARD_ITEM
5098+
standard_item_type: SWORD
50975099
default_statistics:
50985100
damage: 35.0
50995101
- id: GOLDEN_SWORD
@@ -5120,6 +5122,8 @@ items:
51205122
result:
51215123
type: GOLDEN_SWORD
51225124
amount: 1
5125+
- id: STANDARD_ITEM
5126+
standard_item_type: SWORD
51235127
default_statistics:
51245128
damage: 20.0
51255129
- id: IRON_SWORD
@@ -5146,6 +5150,8 @@ items:
51465150
result:
51475151
type: IRON_SWORD
51485152
amount: 1
5153+
- id: STANDARD_ITEM
5154+
standard_item_type: SWORD
51495155
default_statistics:
51505156
damage: 30.0
51515157
- id: STONE_SWORD
@@ -5172,6 +5178,8 @@ items:
51725178
result:
51735179
type: STONE_SWORD
51745180
amount: 1
5181+
- id: STANDARD_ITEM
5182+
standard_item_type: SWORD
51755183
default_statistics:
51765184
damage: 25.0
51775185
- id: WOODEN_SWORD
@@ -5198,6 +5206,8 @@ items:
51985206
result:
51995207
type: WOODEN_SWORD
52005208
amount: 1
5209+
- id: STANDARD_ITEM
5210+
standard_item_type: SWORD
52015211
default_statistics:
52025212
damage: 20.0
52035213
- id: BREWING_STAND

type.generic/src/main/java/net/swofty/types/generic/SkyBlockGenericLoader.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,12 @@ public void initialize(MinecraftServer server) {
219219
/**
220220
* Register entities
221221
*/
222-
typeLoader.getMobs().forEach(mob -> {
223-
MobRegistry.registerExtraMob(mob.getEntityType(), mob.getClazz());
224-
});
222+
loopThroughPackage("net.swofty.types.generic.entity.mob.mobs", SkyBlockMob.class)
223+
.forEach(mob -> MobRegistry.registerExtraMob(mob.getClass()));
224+
225225
MathUtility.delay(() -> SkyBlockMob.runRegionPopulators(MinecraftServer.getSchedulerManager()), 50);
226226

227+
227228
/**
228229
* Handle server attributes
229230
*/

type.generic/src/main/java/net/swofty/types/generic/SkyBlockTypeLoader.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public interface SkyBlockTypeLoader {
3131
List<SkyBlockEventClass> getTraditionalEvents();
3232
List<SkyBlockEventClass> getCustomEvents();
3333

34-
List<MobRegistry> getMobs();
35-
3634
List<SkyBlockNPC> getNPCs();
3735

3836
List<SkyBlockVillagerNPC> getVillagerNPCs();

0 commit comments

Comments
 (0)