mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Add config option to disable GoG lexicon spawn
This commit is contained in:
1 parent
1c49c2a2ad
commit
36342f17da
2 files changed
+9
-1
No files matched your search
@@ -146,6 +146,8 @@ public final class ConfigHandler {
|
||||
public final ForgeConfigSpec.IntValue flowerPatchChance;
|
||||
public final ForgeConfigSpec.DoubleValue flowerTallChance;
|
||||
public final ForgeConfigSpec.IntValue mushroomQuantity;
|
||||
|
||||
public final ForgeConfigSpec.BooleanValue gogSpawnWithLexicon;
|
||||
|
||||
public Common(ForgeConfigSpec.Builder builder) {
|
||||
blockBreakParticles = builder
|
||||
@@ -217,6 +219,9 @@ public final class ConfigHandler {
|
||||
mushroomQuantity = builder
|
||||
.comment("The quantity of Botania mushrooms to generate underground, in the world, defaults to 40, the lower the number the less patches generate.")
|
||||
.defineInRange("worldgen.mushroom.quantity", 40, 0, Integer.MAX_VALUE);
|
||||
gogSpawnWithLexicon = builder
|
||||
.comment("Set this to false to disable spawning with a Lexica Botania in Garden of Glass worlds, if you are modifying the modpack's progression to not start with Botania.")
|
||||
.define("gardenOfGlass.spawnWithLexicon", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileManaFlame;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.lib.ModTags;
|
||||
@@ -156,7 +157,9 @@ public final class SkyblockWorldEvents {
|
||||
ServerPlayerEntity pmp = (ServerPlayerEntity) player;
|
||||
pmp.setPositionAndUpdate(pos.getX() + 0.5, pos.getY() + 1.6, pos.getZ() + 0.5);
|
||||
pmp.setSpawnPoint(pos, true, player.world.getDimension().getType());
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.lexicon));
|
||||
if (ConfigHandler.COMMON.gogSpawnWithLexicon.get()) {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.lexicon));
|
||||
}
|
||||
}
|
||||
|
||||
if(fabricated) {
|
||||
|
||||
Reference in new issue
Block a user