Skip to content

Commit

Permalink
Hub rooms can now be set to all be tall
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackJar72 committed Jun 8, 2021
1 parent 01b71a6 commit feb4ede
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
14 changes: 12 additions & 2 deletions main/java/jaredbgreat/dldungeons/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public final class ConfigHandler {
private static final boolean DEFAULT_VANILLA_LOOT = false;
private static final boolean EASY_FIND = true;
private static final boolean SINGLE_ENTRANCE = true;
private static final boolean BIG_HUBS = false;

private static final boolean DISABLE_API = false;
private static final boolean NO_MOB_CHANGES = false;
Expand All @@ -89,6 +90,8 @@ public final class ConfigHandler {

public static boolean easyFind = EASY_FIND;
public static boolean singleEntrance = SINGLE_ENTRANCE;
public static boolean bigHubs = EASY_FIND;


public static boolean announceCommands = DEFAULT_ANNOUNCE_COMMANDS;
public static boolean vanillaLoot = DEFAULT_VANILLA_LOOT;
Expand Down Expand Up @@ -188,6 +191,11 @@ public static void init() {
+ System.lineSeparator() + "is one that never has entrances.").getBoolean(EASY_FIND);
Logging.logInfo("Will dungeons be easy to find? " + easyFind);

bigHubs = config.get("General", "BigHubs", BIG_HUBS,
"If true entrances and \"boss\" rooms will have extra high ceilings, good with tall mobs")
.getBoolean(BIG_HUBS);
Logging.logInfo("Hub room (entrances and boss rooms) will have high ceiling? " + bigHubs);

singleEntrance = config.get("General", "SingleEntrances", SINGLE_ENTRANCE,
"If true all dungeons will exactly one entrance (if the theme allows entrances), "
+ System.lineSeparator()
Expand Down Expand Up @@ -299,8 +307,10 @@ public static void init() {
+ System.lineSeparator()
+ " random.nextInt(A2 + (RoomDifficulty / B2)) + C2");
nerf = config.getBoolean("NerfEpicLoot", "Loot", false,
"If true it will limit the amount of level 8 loot place with most spawers "
+ "(anything less than a full boss); enable if want to have truly epic items "
"If true it will limit the amount of level 8 loot place with most spawners "
+ System.lineSeparator()
+ "(anything less than a full boss); enable if want to have truly epic items "
+ System.lineSeparator()
+ "like indestructable god picks) but don't want too many of them around.");
TreasureChest.setBasicLootNumbers(a, b, c, nerf);
Room.setLootBonus(config.getInt("Loot Bonus", "Loot", 1, -9, 9,
Expand Down
2 changes: 1 addition & 1 deletion main/java/jaredbgreat/dldungeons/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public final class Info {
public static final String OLD_ID = "DLDungeonsJBG";
public static final String ID = "dldungeonsjbg";
public static final String NAME = "Doomlike Dungeons";
public static final String VERSION = "1.14.3";
public static final String VERSION = "1.14.4";
public static final String MINECRAFT = "1.12.2";
public static final String CHANNEL = "JBGDungeons";
public static final String LOG_NAME = "DLDUNGEONS";
Expand Down
7 changes: 7 additions & 0 deletions main/java/jaredbgreat/dldungeons/planner/Node.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package jaredbgreat.dldungeons.planner;


import jaredbgreat.dldungeons.ConfigHandler;

/*
* Doomlike Dungeons by is licensed the MIT License
* Copyright (c) 2014-2018 Jared Blackburn
Expand Down Expand Up @@ -29,7 +31,12 @@ public Node(int x, int y, int z, Random random, Dungeon dungeon) {
int zdim = random.nextInt((dungeon.size.maxRoomSize / 2) - 3)
+ (dungeon.size.maxRoomSize / 2) + 4;
int ymod = (xdim <= zdim) ? (int) Math.sqrt(xdim) : (int) Math.sqrt(zdim);

int height = random.nextInt((dungeon.verticle.value / 2) + ymod + 1) + 2;
if(ConfigHandler.bigHubs ) {
height = Math.min(12, Math.max(7, Math.max(height * 2, height + dungeon.random.nextInt(3) + 2)));
}


// Then plant a seed and try to grow the room
hubRoom = new RoomSeed(x, y, z).growRoom(xdim, zdim, height, dungeon, null, null);
Expand Down
2 changes: 1 addition & 1 deletion main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "dldungeonsjbg",
"name": "Doomlike Dungeons",
"description": "Procedurally generates multiroom dungeons resembling Doom levels into the world.",
"version": "1.14.3",
"version": "1.14.4",
"mcversion": "1.12.2",
"url": "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1293843-doomlike-dungeons",
"updateUrl": "",
Expand Down

0 comments on commit feb4ede

Please sign in to comment.