Skip to content

Commit

Permalink
Fix village map
Browse files Browse the repository at this point in the history
  • Loading branch information
ellieisjelly committed Jan 10, 2024
1 parent 21b8338 commit e37bb42
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.util.Identifier;
import xyz.nucleoid.fantasy.Fantasy;
import xyz.nucleoid.plasmid.game.common.config.PlayerConfig;

public record SabotageConfig(Identifier map, Identifier dimension, int countdownTime, int gracePeriod, int timeLimit, int endDelay, int chestCount, InnocentConfig innocentConfig, DetectiveConfig detectiveConfig, SaboteurConfig saboteurConfig, PlayerConfig playerConfig) {
public static final Codec<SabotageConfig> CODEC = RecordCodecBuilder.create(instance ->
instance.group(
Identifier.CODEC.fieldOf("map").forGetter(SabotageConfig::map),
Identifier.CODEC.optionalFieldOf("dimension", new Identifier("minecraft:overworld")).forGetter(SabotageConfig::dimension),
Identifier.CODEC.optionalFieldOf("dimension", Fantasy.DEFAULT_DIM_TYPE.getValue()).forGetter(SabotageConfig::dimension),
Codec.INT.optionalFieldOf("countdown_time", 5).forGetter(SabotageConfig::countdownTime),
Codec.INT.optionalFieldOf("grace_period", 15).forGetter(SabotageConfig::gracePeriod),
Codec.INT.optionalFieldOf("time_limit", 1200).forGetter(SabotageConfig::timeLimit),
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/data/sabotage/games/village.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"type": "sabotage:sabotage",
"map": "sabotage:village",
"chest_count": 125
"chest_count": 125,
"players": {
"min": 1,
"max": 64,
"threshold": 6
}
}
Binary file modified src/main/resources/data/sabotage/map_templates/village.nbt
Binary file not shown.

0 comments on commit e37bb42

Please sign in to comment.