Added config option for light level.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package dev.micle.firefly_bush_backport.block;
|
||||
|
||||
import dev.micle.firefly_bush_backport.FireflyBushBackport;
|
||||
import dev.micle.firefly_bush_backport.config.Config;
|
||||
import dev.micle.firefly_bush_backport.item.ModItems;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
@ -23,7 +24,7 @@ public class ModBlocks {
|
||||
() -> new FireflyBushBlock(BlockBehaviour.Properties.of()
|
||||
.mapColor(MapColor.PLANT)
|
||||
.ignitedByLava()
|
||||
.lightLevel(blockState -> 2)
|
||||
.lightLevel(blockState -> Config.Client.bushFireflyLightLevel.get())
|
||||
.noCollission()
|
||||
.instabreak()
|
||||
.sound(SoundType.SWEET_BERRY_BUSH)
|
||||
|
@ -57,6 +57,7 @@ public final class Config {
|
||||
public static ForgeConfigSpec.IntValue bushFireflyAmbientSoundChanceOneIn;
|
||||
public static ForgeConfigSpec.DoubleValue bushFireflyAmbientSoundVolume;
|
||||
public static ForgeConfigSpec.DoubleValue bushFireflyAmbientSoundPitch;
|
||||
public static ForgeConfigSpec.IntValue bushFireflyLightLevel;
|
||||
|
||||
Client(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("Official settings for the firefly bush.").push("bush");
|
||||
@ -74,6 +75,9 @@ public final class Config {
|
||||
.defineInRange("bushFireflyAmbientSoundVolume", 1.0, 0, Double.MAX_VALUE);
|
||||
bushFireflyAmbientSoundPitch = builder
|
||||
.defineInRange("bushFireflyAmbientSoundPitch", 1.0, 0, Double.MAX_VALUE);
|
||||
bushFireflyLightLevel = builder
|
||||
.comment("NOTE: This option requires a restart!")
|
||||
.defineInRange("bushFireflyLightLevel", 2, 0, Level.MAX_BRIGHTNESS);
|
||||
builder.pop();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user