AmbientAdditionsSettings .java

net.minecraft.world.attribute.AmbientAdditionsSettings (record, 14 lines): members: soundEvent, tickChance, CODEC. strings: "tick_chance", "sound".

net.minecraft.world.attributerecord14 linescommon587 B

API Surface (1)

record AmbientAdditionsSettings(Holder<SoundEvent> soundEvent, double tickChance)

Fields & Constants (1)

CODEC

String literals (2)

"sound"
"tick_chance"

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

AmbientAdditionsSettings.java14 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.attribute;
2
3
import com.mojang.serialization.Codec;
4
import com.mojang.serialization.codecs.RecordCodecBuilder;
5
import net.minecraft.core.Holder;
6
import net.minecraft.sounds.SoundEvent;
7
8
public record AmbientAdditionsSettings(Holder<SoundEvent> soundEvent, double tickChance) {
9
	public static final Codec<AmbientAdditionsSettings> CODEC = RecordCodecBuilder.create(
10
		i -> i.group(SoundEvent.CODEC.fieldOf("sound").forGetter(s -> s.soundEvent), Codec.DOUBLE.fieldOf("tick_chance").forGetter(s -> s.tickChance))
11
			.apply(i, AmbientAdditionsSettings::new)
12
	);
13
}
14

Decompiled Minecraft 26.3 source of AmbientAdditionsSettings (net/minecraft/world/attribute/AmbientAdditionsSettings.java) with Mojang official mappings, stored verbatim on the site.