Class EnvironmentAttributes.Builder

java.lang.Object
fr.fidorial.world.environment.EnvironmentAttributes.Builder
Enclosing class:
EnvironmentAttributes

public static final class EnvironmentAttributes.Builder extends Object
Mutable builder for EnvironmentAttributes.
Since:
0.1.0
  • Method Details

    • fogColor

      @Contract("_ -> this") public EnvironmentAttributes.Builder fogColor(@Nullable Integer value)
      Sets minecraft:visual/fog_color as a plain override.
      Parameters:
      value - distance fog color, packed RGB, or null to leave unset
      Returns:
      this builder
    • fogColor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder fogColor(Integer value, Modifier modifier)
      Sets minecraft:visual/fog_color, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • fogStartDistance

      @Contract("_ -> this") public EnvironmentAttributes.Builder fogStartDistance(@Nullable Float value)
      Sets minecraft:visual/fog_start_distance as a plain override.
      Parameters:
      value - distance in blocks at which fog begins, or null to leave unset
      Returns:
      this builder
    • fogStartDistance

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder fogStartDistance(Float value, Modifier modifier)
      Sets minecraft:visual/fog_start_distance, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • fogEndDistance

      @Contract("_ -> this") public EnvironmentAttributes.Builder fogEndDistance(@Nullable Float value)
      Sets minecraft:visual/fog_end_distance as a plain override.
      Parameters:
      value - distance in blocks at which fog reaches full density, or null to leave unset
      Returns:
      this builder
    • fogEndDistance

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder fogEndDistance(Float value, Modifier modifier)
      Sets minecraft:visual/fog_end_distance, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • skyColor

      @Contract("_ -> this") public EnvironmentAttributes.Builder skyColor(@Nullable Integer value)
      Sets minecraft:visual/sky_color as a plain override.
      Parameters:
      value - sky color, packed RGB, or null to leave unset
      Returns:
      this builder
    • skyColor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder skyColor(Integer value, Modifier modifier)
      Sets minecraft:visual/sky_color, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • cloudColor

      @Contract("_ -> this") public EnvironmentAttributes.Builder cloudColor(@Nullable Integer value)
      Sets minecraft:visual/cloud_color as a plain override.
      Parameters:
      value - cloud color, packed ARGB, or null to leave unset
      Returns:
      this builder
    • cloudColor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder cloudColor(Integer value, Modifier modifier)
      Sets minecraft:visual/cloud_color, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • cloudHeight

      @Contract("_ -> this") public EnvironmentAttributes.Builder cloudHeight(@Nullable Float value)
      Sets minecraft:visual/cloud_height as a plain override.
      Parameters:
      value - height, in blocks, at which clouds render, or null to leave unset
      Returns:
      this builder
    • cloudHeight

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder cloudHeight(Float value, Modifier modifier)
      Sets minecraft:visual/cloud_height, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • skyLightColor

      @Contract("_ -> this") public EnvironmentAttributes.Builder skyLightColor(@Nullable Integer value)
      Sets minecraft:visual/sky_light_color as a plain override.
      Parameters:
      value - sky light color, packed RGB, or null to leave unset
      Returns:
      this builder
    • skyLightColor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder skyLightColor(Integer value, Modifier modifier)
      Sets minecraft:visual/sky_light_color, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • skyLightFactor

      @Contract("_ -> this") public EnvironmentAttributes.Builder skyLightFactor(@Nullable Float value)
      Sets minecraft:visual/sky_light_factor as a plain override.
      Parameters:
      value - multiplier applied to sky light, within [0, 1], or null to leave unset
      Returns:
      this builder
    • skyLightFactor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder skyLightFactor(Float value, Modifier modifier)
      Sets minecraft:visual/sky_light_factor, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • ambientLightColor

      @Contract("_ -> this") public EnvironmentAttributes.Builder ambientLightColor(@Nullable Integer value)
      Sets minecraft:visual/ambient_light_color as a plain override.
      Parameters:
      value - ambient light color, packed RGB, or null to leave unset
      Returns:
      this builder
    • ambientLightColor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder ambientLightColor(Integer value, Modifier modifier)
      Sets minecraft:visual/ambient_light_color, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • defaultDripstoneParticle

      @Contract("_ -> this") public EnvironmentAttributes.Builder defaultDripstoneParticle(@Nullable Key value)
      Sets minecraft:visual/default_dripstone_particle as a plain override.
      Parameters:
      value - particle used by dripping dripstone, or null to leave unset
      Returns:
      this builder
    • defaultDripstoneParticle

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder defaultDripstoneParticle(Key value, Modifier modifier)
      Sets minecraft:visual/default_dripstone_particle, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • waterFogColor

      @Contract("_ -> this") public EnvironmentAttributes.Builder waterFogColor(@Nullable Integer value)
      Sets minecraft:visual/water_fog_color as a plain override.
      Parameters:
      value - underwater fog color, packed RGB, or null to leave unset
      Returns:
      this builder
    • waterFogColor

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder waterFogColor(Integer value, Modifier modifier)
      Sets minecraft:visual/water_fog_color, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • waterFogEndDistance

      @Contract("_ -> this") public EnvironmentAttributes.Builder waterFogEndDistance(@Nullable Float value)
      Sets minecraft:visual/water_fog_end_distance as a plain override.
      Parameters:
      value - distance in blocks at which underwater fog reaches full density, or null to leave unset
      Returns:
      this builder
    • waterFogEndDistance

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder waterFogEndDistance(Float value, Modifier modifier)
      Sets minecraft:visual/water_fog_end_distance, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • musicVolume

      @Contract("_ -> this") public EnvironmentAttributes.Builder musicVolume(@Nullable Float value)
      Sets minecraft:audio/music_volume as a plain override.
      Parameters:
      value - volume music fades to, within [0, 1], or null to leave unset
      Returns:
      this builder
    • musicVolume

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder musicVolume(Float value, Modifier modifier)
      Sets minecraft:audio/music_volume, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • canStartRaid

      @Contract("_ -> this") public EnvironmentAttributes.Builder canStartRaid(@Nullable Boolean value)
      Sets minecraft:gameplay/can_start_raid as a plain override.
      Parameters:
      value - whether a raid can begin here, or null to leave unset
      Returns:
      this builder
    • canStartRaid

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder canStartRaid(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/can_start_raid, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • canPillagerPatrolSpawn

      @Contract("_ -> this") public EnvironmentAttributes.Builder canPillagerPatrolSpawn(@Nullable Boolean value)
      Sets minecraft:gameplay/can_pillager_patrol_spawn as a plain override.
      Parameters:
      value - whether pillager patrols spawn here, or null to leave unset
      Returns:
      this builder
    • canPillagerPatrolSpawn

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder canPillagerPatrolSpawn(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/can_pillager_patrol_spawn, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • waterEvaporates

      @Contract("_ -> this") public EnvironmentAttributes.Builder waterEvaporates(@Nullable Boolean value)
      Sets minecraft:gameplay/water_evaporates as a plain override.
      Parameters:
      value - whether placed water evaporates, or null to leave unset
      Returns:
      this builder
    • waterEvaporates

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder waterEvaporates(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/water_evaporates, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • bedRule

      @Contract("_ -> this") public EnvironmentAttributes.Builder bedRule(@Nullable BedRule value)
      Sets minecraft:gameplay/bed_rule as a plain override.
      Parameters:
      value - when beds are usable to sleep/set spawn, or null to leave unset
      Returns:
      this builder
    • bedRule

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder bedRule(BedRule value, Modifier modifier)
      Sets minecraft:gameplay/bed_rule, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • respawnAnchorWorks

      @Contract("_ -> this") public EnvironmentAttributes.Builder respawnAnchorWorks(@Nullable Boolean value)
      Sets minecraft:gameplay/respawn_anchor_works as a plain override.
      Parameters:
      value - whether respawn anchors set spawn instead of exploding, or null to leave unset
      Returns:
      this builder
    • respawnAnchorWorks

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder respawnAnchorWorks(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/respawn_anchor_works, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • netherPortalSpawnsPiglin

      @Contract("_ -> this") public EnvironmentAttributes.Builder netherPortalSpawnsPiglin(@Nullable Boolean value)
      Sets minecraft:gameplay/nether_portal_spawns_piglin as a plain override.
      Parameters:
      value - whether entering a nether portal can spawn a piglin, or null to leave unset
      Returns:
      this builder
    • netherPortalSpawnsPiglin

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder netherPortalSpawnsPiglin(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/nether_portal_spawns_piglin, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • fastLava

      @Contract("_ -> this") public EnvironmentAttributes.Builder fastLava(@Nullable Boolean value)
      Sets minecraft:gameplay/fast_lava as a plain override.
      Parameters:
      value - whether lava flows and spreads at Nether speed, or null to leave unset
      Returns:
      this builder
    • fastLava

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder fastLava(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/fast_lava, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • increasedFireBurnout

      @Contract("_ -> this") public EnvironmentAttributes.Builder increasedFireBurnout(@Nullable Boolean value)
      Sets minecraft:gameplay/increased_fire_burnout as a plain override.
      Parameters:
      value - whether fire burns out faster, or null to leave unset
      Returns:
      this builder
    • increasedFireBurnout

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder increasedFireBurnout(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/increased_fire_burnout, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • piglinsZombify

      @Contract("_ -> this") public EnvironmentAttributes.Builder piglinsZombify(@Nullable Boolean value)
      Sets minecraft:gameplay/piglins_zombify as a plain override.
      Parameters:
      value - whether piglins and hoglins zombify, or null to leave unset
      Returns:
      this builder
    • piglinsZombify

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder piglinsZombify(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/piglins_zombify, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • snowGolemMelts

      @Contract("_ -> this") public EnvironmentAttributes.Builder snowGolemMelts(@Nullable Boolean value)
      Sets minecraft:gameplay/snow_golem_melts as a plain override.
      Parameters:
      value - whether snow golems take damage, or null to leave unset
      Returns:
      this builder
    • snowGolemMelts

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder snowGolemMelts(Boolean value, Modifier modifier)
      Sets minecraft:gameplay/snow_golem_melts, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • skyLightLevel

      @Contract("_ -> this") public EnvironmentAttributes.Builder skyLightLevel(@Nullable Float value)
      Sets minecraft:gameplay/sky_light_level as a plain override.
      Parameters:
      value - sky light level, within [0, 15], or null to leave unset
      Returns:
      this builder
    • skyLightLevel

      @Contract("_, _ -> this") public EnvironmentAttributes.Builder skyLightLevel(Float value, Modifier modifier)
      Sets minecraft:gameplay/sky_light_level, deriving from the dimension's value.
      Parameters:
      value - the modifier argument
      modifier - how to combine it
      Returns:
      this builder
    • addAmbientParticle

      @Contract("_ -> this") public EnvironmentAttributes.Builder addAmbientParticle(AmbientParticle particle)
      Adds one ambient particle to minecraft:visual/ambient_particles.
      Parameters:
      particle - the particle
      Returns:
      this builder
    • ambientParticles

      @Contract("_ -> this") public EnvironmentAttributes.Builder ambientParticles(List<AmbientParticle> particles)
      Replaces the whole ambient particle list.
      Parameters:
      particles - the particles
      Returns:
      this builder
    • ambientSounds

      @Contract("_ -> this") public EnvironmentAttributes.Builder ambientSounds(@Nullable AmbientSounds value)
      Sets minecraft:audio/ambient_sounds.
      Parameters:
      value - looping, mood and additions sounds, or null to leave unset
      Returns:
      this builder
    • backgroundMusic

      @Contract("_ -> this") public EnvironmentAttributes.Builder backgroundMusic(@Nullable BackgroundMusic value)
      Sets minecraft:audio/background_music.
      Parameters:
      value - music tracks, or null to leave unset
      Returns:
      this builder
    • build

      @Contract(value="-> new", pure=true) public EnvironmentAttributes build()
      Returns the immutable attributes described by this builder.
      Returns:
      the immutable attributes described by this builder