Skip to content

Commit

Permalink
Add map author
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugman76 committed Aug 7, 2023
1 parent 74d4214 commit 80b50ad
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can also find us on our [Discord](https://nucleoid.xyz/discord) if you have
Build Rush can be installed on a client or a server. As this is a multiplayer minigame though, it is recommended to install it on a server.

⚠ Build Rush **needs** the following mods to be installed:
- Plasmid: [GitHub](https://github.com/NucleoidMC/plasmid)/[Modrinth](https://modrinth.com/mod/plasmid)
- Plasmid: [GitHub](https://github.com/NucleoidMC/plasmid) / [Modrinth](https://modrinth.com/mod/plasmid)
- Fabric API: [GitHub](https://github.com/FabricMC/fabric) / [CurseForge](https://www.curseforge.com/minecraft/mc-mods/fabric-api) / [Modrinth](https://modrinth.com/mod/fabric-api)

## Usage
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx1G

# Mod Properties
mod_version=3.0.0
mod_version=3.0.1
maven_group=fr.hugman
archives_base_name=build_rush

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/fr/hugman/build_rush/map/BRMapConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import fr.hugman.build_rush.misc.Author;
import net.minecraft.util.Identifier;

public record BRMapConfig(Identifier template, int nametagOffset, float nametagSize) {
import java.util.Optional;

public record BRMapConfig(Identifier template, Optional<Author> author, int nametagOffset, float nametagSize) {
public static final Codec<BRMapConfig> CODEC = RecordCodecBuilder.create(instance -> instance.group(
Identifier.CODEC.fieldOf("template").forGetter(BRMapConfig::template),
Author.CODEC.optionalFieldOf("author").forGetter(BRMapConfig::author),
Codec.INT.optionalFieldOf("nametag_offset", 10).forGetter(BRMapConfig::nametagOffset),
Codec.FLOAT.optionalFieldOf("nametag_size", 5.0f).forGetter(BRMapConfig::nametagSize)
).apply(instance, BRMapConfig::new));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
"max": 16
},
"map": {
"template": "build_rush:minuscule_memories"
"template": "build_rush:minuscule_memories",
"author": {
"name": "Hugman",
"uuid": "c789cee4-c9fb-4c1b-8a58-fa64dff0034f"
}
},
"builds": "#build_rush:generic"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
},
"map": {
"template": "build_rush:rock_candy_mines",
"author": {
"name": "Hugman",
"uuid": "c789cee4-c9fb-4c1b-8a58-fa64dff0034f"
},
"nametag_offset": 5,
"nametag_size": 7
},
Expand Down

0 comments on commit 80b50ad

Please sign in to comment.