23 lines
945 B
Java
23 lines
945 B
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.mojang.datafixers.kinds.App
|
|
* com.mojang.datafixers.kinds.Applicative
|
|
* com.mojang.serialization.Codec
|
|
* com.mojang.serialization.codecs.RecordCodecBuilder
|
|
*/
|
|
package net.minecraft.world.attribute;
|
|
|
|
import com.mojang.datafixers.kinds.App;
|
|
import com.mojang.datafixers.kinds.Applicative;
|
|
import com.mojang.serialization.Codec;
|
|
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
|
import net.minecraft.core.Holder;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
|
|
public record AmbientAdditionsSettings(Holder<SoundEvent> soundEvent, double tickChance) {
|
|
public static final Codec<AmbientAdditionsSettings> CODEC = RecordCodecBuilder.create(i -> i.group((App)SoundEvent.CODEC.fieldOf("sound").forGetter(s -> s.soundEvent), (App)Codec.DOUBLE.fieldOf("tick_chance").forGetter(s -> s.tickChance)).apply((Applicative)i, AmbientAdditionsSettings::new));
|
|
}
|
|
|