Skip to content

Commit

Permalink
3.2.1 - Add 2 rooms, fix room, reduce raytraces, minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantizr committed Aug 26, 2021
1 parent 226b15a commit 7316cb5
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 26 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "3.2.0"
version = "3.2.1"
group= "io.github.quantizr.DungeonRooms" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Dungeon_Rooms"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
public class DungeonRooms
{
public static final String MODID = "dungeonrooms";
public static final String VERSION = "3.2.0";
public static final String VERSION = "3.2.1";

Minecraft mc = Minecraft.getMinecraft();
public static Logger logger;
Expand Down Expand Up @@ -231,7 +231,7 @@ public void onServerConnect(FMLNetworkEvent.ClientConnectedToServerEvent event)
}

logger.info("DungeonRooms: Getting MOTD...");
url = new URL("https://gist.githubusercontent.com/Quantizr/93854978061c921a4c63fc41fd6cf263/raw/");
url = new URL("https://gist.githubusercontent.com/Quantizr/50ed64a7a0f3b28dc742d5268d7a3217/raw/");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), StandardCharsets.UTF_8));
String line;
motd = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,7 @@ public void processCommand(ICommandSender arg0, String[] arg1) {
Waypoints.enabled = !Waypoints.enabled;
ConfigHandler.writeBooleanConfig("waypoint", "waypointsToggled", Waypoints.enabled);
if (Waypoints.enabled) {
player.addChatMessage(new ChatComponentText("§eDungeon Rooms: Waypoints will now automatically show up when you enter a new dungeon room.\n"
+ "§c§l WARNING:§r§c While waypoints are not detectable and most likely §lNOT bannable§r§c, some players view them as an unfair advantage.\n"
+ "§c Please understand, especially if you are recording or streaming, that, while you most likely are fine, this feature is §lUse At Your Own Risk§r§c. "
+ "If this is a concern for you, please disable waypoints and view secret images instead with the hotkey \""
+ GameSettings.getKeyDisplayString(DungeonRooms.keyBindings[1].getKeyCode()) + "\"."
));
player.addChatMessage(new ChatComponentText("§eDungeon Rooms: Waypoints will now automatically show up when you enter a new dungeon room."));
} else {
player.addChatMessage(new ChatComponentText("§eDungeon Rooms: Waypoints have been disabled."));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,11 @@ public void onTick(TickEvent.ClientTickEvent event) {
resetCurrentRoom(); //only instance of resetting room other than leaving Dungeon
} else if (incompleteScan != 0 && System.currentTimeMillis() > incompleteScan) {
incompleteScan = 0;
player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW
+ "Dungeon Rooms: Rescanning room..."));
DungeonRooms.logger.info("DungeonRooms: Rescanning room...");
raytraceBlocks();
} else if (redoScan != 0 && System.currentTimeMillis() > redoScan) {
redoScan = 0;
player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW
+ "Dungeon Rooms: Clearing data and rescanning room..."));
DungeonRooms.logger.info("DungeonRooms: Clearing data and rescanning room...");
possibleRooms = null;
raytraceBlocks();
}
Expand Down Expand Up @@ -199,15 +197,15 @@ public void onTick(TickEvent.ClientTickEvent event) {
DungeonRooms.textToDisplay = new ArrayList<>(Arrays.asList(
"Dungeon Rooms: " + EnumChatFormatting.RED + "No Matching Rooms Detected",
EnumChatFormatting.RED + "This mod might not have data for this room.",
EnumChatFormatting.WHITE + "Retrying every 10 seconds..."
EnumChatFormatting.WHITE + "Retrying every 5 seconds..."
));
redoScan = System.currentTimeMillis() + 10000;
redoScan = System.currentTimeMillis() + 5000;

} else if (possibleRoomsSet.size() == 1) { //room found
roomName = possibleRoomsSet.first();
roomDirection = tempDirection;
roomCorner = MapUtils.getPhysicalCornerPos(roomDirection, currentPhysicalSegments);
DungeonRooms.logger.info("DungeonRooms: 1024 raytrace vectors sent, returning "
DungeonRooms.logger.info("DungeonRooms: 576 raytrace vectors sent, returning "
+ currentScannedBlocks.size() + " unique line-of-sight blocks, filtered down to "
+ totalBlocksAvailableToCheck + " blocks, out of which " + blocksUsed.size()
+ " blocks were used to uniquely identify " + roomName + ".");
Expand All @@ -217,11 +215,11 @@ public void onTick(TickEvent.ClientTickEvent event) {
DungeonRooms.textToDisplay = new ArrayList<>(Arrays.asList(
"Dungeon Rooms: " + EnumChatFormatting.RED + "Unable to Determine Room Name",
EnumChatFormatting.RED + "Not enough valid blocks were scanned, look at a more open area.",
EnumChatFormatting.WHITE + "Retrying every 2 seconds..."
EnumChatFormatting.WHITE + "Retrying every second..."
));

DungeonRooms.logger.debug("DungeonRooms: Possible rooms list = " + new ArrayList<>(possibleRoomsSet));
incompleteScan = System.currentTimeMillis() + 2000;
incompleteScan = System.currentTimeMillis() + 1000;
}
} catch (ExecutionException | InterruptedException e) {
e.printStackTrace();
Expand Down Expand Up @@ -316,7 +314,7 @@ void raytraceBlocks() {

EntityPlayerSP player = mc.thePlayer;

List<Vec3> vecList = RoomDetectionUtils.vectorsToRaytrace(32); //actually creates 32^2 = 1024 raytrace vectors
List<Vec3> vecList = RoomDetectionUtils.vectorsToRaytrace(24); //actually creates 24^2 = 576 raytrace vectors

Vec3 eyes = new Vec3(player.posX, player.posY + (double)player.getEyeHeight(), player.posZ);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ public void actionPerformed(GuiButton button) {
waypointsEnabled.displayString = waypointBtnText();
if (Waypoints.enabled) {
player.addChatMessage(new ChatComponentText("§eDungeon Rooms: Waypoints will now automatically show up when you enter a new dungeon room.\n"
+ "§c§l WARNING:§r§c While waypoints are not detectable and most likely §lNOT bannable§r§c, some players view them as an unfair advantage.\n"
+ "§c Please understand, especially if you are recording or streaming, that, while you most likely are fine, this feature is §lUse At Your Own Risk§r§c. "
+ "If this is a concern for you, please disable waypoints and view secret images instead with the hotkey \""
+ "§c§l WARNING:§r§c While waypoints are not detectable and most likely §lNOT bannable§r§c, this feature is §lUse At Your Own Risk§r§c.\n"
+ "No one has ever been banned, but if this is a concern for you, please disable waypoints and view secret images instead with the hotkey \""
+ GameSettings.getKeyDisplayString(DungeonRooms.keyBindings[0].getKeyCode()) + "\"."
));
}
Expand Down
Binary file not shown.
Binary file not shown.
13 changes: 10 additions & 3 deletions src/main/resources/assets/dungeonrooms/dungeonrooms.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
"category": "1x1",
"secrets": 3,
"fairysoul": false,
"dsg": "/channels/727426780381577291/879825848746790942/879826007824162856",
"dsg": "/channels/727426780381577291/880155380058046474/880155606240100402",
"sbp": "double-diamond"
},
"Water-2": {
Expand Down Expand Up @@ -502,6 +502,13 @@
"dsg": "/channels/727426780381577291/769368436408188938/776261030211747891",
"sbp": "lava-skull"
},
"Long-Hall-3": {
"category": "1x1",
"secrets": 3,
"fairysoul": false,
"dsg": "/channels/727426780381577291/879896823026831401/879897603091869697",
"sbp": "long-hall"
},
"Mini-Rail-Track-3": {
"category": "1x1",
"secrets": 3,
Expand Down Expand Up @@ -796,12 +803,12 @@
"dsg": "/channels/727426780381577291/733046323556777988/733827872740999189",
"sbp": "flags"
},
"Mithril-Caves-7": {
"Mithril-Cave-7": {
"category": "2x2",
"secrets": 7,
"fairysoul": false,
"dsg": "/channels/727426780381577291/879793274766913616/879813440057798697",
"sbp": "mithril-caves"
"sbp": "mithril-cave"
},
"Cathedral-8": {
"category": "2x2",
Expand Down
76 changes: 75 additions & 1 deletion src/main/resources/assets/dungeonrooms/secretlocations.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,29 @@
"z":24
}
],
"Overgrown-Chains-2":[
{
"secretName":"1 - Entrance",
"category":"entrance",
"x":3,
"y":86,
"z":9
},
{
"secretName":"1 - Chest",
"category":"chest",
"x":26,
"y":86,
"z":20
},
{
"secretName":"2 - Item",
"category":"item",
"x":3,
"y":82,
"z":2
}
],
"Painting-2":[
{
"secretName":"1 - Entrance behind Painting",
Expand Down Expand Up @@ -1217,6 +1240,57 @@
"z":7
}
],
"Long-Hall-3":[
{
"secretName":"1 - Crypt",
"category":"superboom",
"x":6,
"y":70,
"z":25
},
{
"secretName":"1 - Chest",
"category":"chest",
"x":18,
"y":62,
"z":23
},
{
"secretName":"2 - Superboom",
"category":"superboom",
"x":15,
"y":70,
"z":5
},
{
"secretName":"2 - Lever",
"category":"lever",
"x":10,
"y":70,
"z":3
},
{
"secretName":"2 - Entrance",
"category":"entrance",
"x":10,
"y":85,
"z":20
},
{
"secretName":"2 - Chest",
"category":"chest",
"x":28,
"y":81,
"z":25
},
{
"secretName":"3 - Chest",
"category":"chest",
"x":28,
"y":82,
"z":15
}
],
"Dueces-3":[
{
"secretName":"1/2 - Superboom",
Expand Down Expand Up @@ -3595,7 +3669,7 @@
"z":58
}
],
"Mithril-Caves-7":[
"Mithril-Cave-7":[
{
"secretName":"1 - Entrance",
"category":"entrance",
Expand Down

0 comments on commit 7316cb5

Please sign in to comment.