Skip to content

Commit

Permalink
add: assets from head module
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurawald committed Jul 27, 2024
1 parent 5220971 commit 0a9de6d
Show file tree
Hide file tree
Showing 15 changed files with 165,817 additions and 10 deletions.
35,120 changes: 35,120 additions & 0 deletions assets/module/head/alphabet.json

Large diffs are not rendered by default.

24,002 changes: 24,002 additions & 0 deletions assets/module/head/animals.json

Large diffs are not rendered by default.

10,556 changes: 10,556 additions & 0 deletions assets/module/head/blocks.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/module/head/decoration.json

Large diffs are not rendered by default.

12,044 changes: 12,044 additions & 0 deletions assets/module/head/food-drinks.json

Large diffs are not rendered by default.

42,020 changes: 42,020 additions & 0 deletions assets/module/head/humanoid.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/module/head/humans.json

Large diffs are not rendered by default.

14,336 changes: 14,336 additions & 0 deletions assets/module/head/miscellaneous.json

Large diffs are not rendered by default.

21,002 changes: 21,002 additions & 0 deletions assets/module/head/monsters.json

Large diffs are not rendered by default.

6,722 changes: 6,722 additions & 0 deletions assets/module/head/plants.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/main/java/io/github/sakurawald/Fuji.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

import java.nio.file.Path;

import static io.github.sakurawald.module.ModuleManager.initializeModules;

// TODO: rank module (track, requirement)
// TODO: spawn module (facility)
// TODO: hologram module (facility)
Expand All @@ -35,7 +33,7 @@ public void onInitialize() {
Managers.getBossBarManager().initialize();

/* modules */
initializeModules();
ModuleManager.initializeModules();
ServerLifecycleEvents.SERVER_STARTED.register(server -> ModuleManager.reportModules());

/* scheduler */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ public void store(@NotNull ServerPlayerEntity player) {

NbtCompound root = NbtHelper.read(path);
NbtList deathsNode = (NbtList) NbtHelper.getOrDefault(root, DEATHS, new NbtList());
deathsNode.add(createDeathNode(player));
deathsNode.add(makeDeathNode(player));
NbtHelper.write(root, path);
}

private @NotNull NbtCompound createDeathNode(@NotNull ServerPlayerEntity player) {
private @NotNull NbtCompound makeDeathNode(@NotNull ServerPlayerEntity player) {
NbtCompound node = new NbtCompound();
writeInventoryNode(node, player);
writeRemarkNode(node, player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.github.sakurawald.util.LogUtil;
import net.fabricmc.loader.api.FabricLoader;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.jetbrains.annotations.NotNull;

import java.io.BufferedInputStream;
Expand All @@ -33,6 +34,7 @@ public class HeadDatabaseAPI {

@SuppressWarnings("OptionalGetWithoutIsPresent")
private void refreshCacheFromAPI() {

for (Category category : Category.values()) {
try {
LogUtil.info("Saving {} heads to cache", category.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.dimension.DimensionTypes;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -71,15 +73,16 @@ void registerStore() {
MinecraftServer server = player.server;
PlayerManager playerManager = server.getPlayerManager();


// Registry<DimensionType> dimensionTypes = IdentifierHelper.ofRegistry(RegistryKeys.DIMENSION_TYPE);
// for (DimensionType o : dimensionTypes) {
// LogUtil.warn("id = {} \n o = {}", dimensionTypes.getId(o).toString(),o);
// }

Registry<DimensionOptions> dimensionOptions = IdentifierHelper.ofRegistry(RegistryKeys.DIMENSION);
for (DimensionOptions dimensionOption : dimensionOptions) {
LogUtil.warn("dimension option id = {}", dimensionOptions.getId(dimensionOption));
}
// Registry<DimensionOptions> dimensionOptions = IdentifierHelper.ofRegistry(RegistryKeys.DIMENSION);
// for (DimensionOptions dimensionOption : dimensionOptions) {
// LogUtil.warn("dimension option id = {}", dimensionOptions.getId(dimensionOption));
// }

return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Fuji",
"icon": "assets/fuji/icon.png",
"description": "A mod that provides many essential and useful modules for vanilla survival.",
"license": "CC0-1.0",
"license": "GPL-3.0",
"contact": {
"homepage": "https://github.com/SakuraWald",
"sources": "https://github.com/sakurawald/fuji-fabric/",
Expand Down

0 comments on commit 0a9de6d

Please sign in to comment.