Created config options for block breaking.
This commit is contained in:
@ -6,6 +6,9 @@ import net.minecraftforge.fml.common.Mod;
|
|||||||
import net.minecraftforge.fml.config.ModConfig;
|
import net.minecraftforge.fml.config.ModConfig;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mod.EventBusSubscriber(modid = XpTools.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
@Mod.EventBusSubscriber(modid = XpTools.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||||
public final class Config {
|
public final class Config {
|
||||||
public static final Client CLIENT;
|
public static final Client CLIENT;
|
||||||
@ -44,6 +47,22 @@ public final class Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class Server {
|
public static class Server {
|
||||||
Server(ForgeConfigSpec.Builder builder) {}
|
public static ForgeConfigSpec.BooleanValue BLOCK_BREAK_DEFAULT_NO_XP;
|
||||||
|
public static ForgeConfigSpec.ConfigValue<List<String>> BLOCK_BREAK_OVERRIDES;
|
||||||
|
|
||||||
|
Server(ForgeConfigSpec.Builder builder) {
|
||||||
|
builder.comment("Settings for block breaking").push("block_breaking");
|
||||||
|
BLOCK_BREAK_DEFAULT_NO_XP = builder
|
||||||
|
.comment("Should all blocks drop 0 XP by default?")
|
||||||
|
.comment("(This makes multipliers not have any effect)")
|
||||||
|
.define("blockBreakXpDisabled", false);
|
||||||
|
BLOCK_BREAK_OVERRIDES = builder
|
||||||
|
.comment("List of all overrides. Format: '[block_id/tag],[multi/val],[min],[max]'")
|
||||||
|
.comment("Examples:")
|
||||||
|
.comment("'minecraft:dirt,val,2,2' - Makes minecraft's dirt blocks drop 2 XP")
|
||||||
|
.comment("'#forge:ores,multi,1,2' - Applies an XP multiplier between 1-2 to all blocks tagged forge:ores")
|
||||||
|
.define("blockBreakOverrides", new ArrayList<>());
|
||||||
|
builder.pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user