Skip to content

Commit

Permalink
fix: dungeon map not correctly disabling in boss
Browse files Browse the repository at this point in the history
  • Loading branch information
Morazzer committed Nov 16, 2024
1 parent 8331c86 commit 2ad261d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package codes.cookies.mod.features.dungeons;

import codes.cookies.mod.utils.cookies.CookiesUtils;
import dev.morazzer.cookies.entities.websocket.Packet;
import dev.morazzer.cookies.entities.websocket.packets.DungeonJoinPacket;
import dev.morazzer.cookies.entities.websocket.packets.DungeonLeavePacket;
Expand Down Expand Up @@ -343,8 +344,10 @@ private void handlePuzzleEntry(Text text, int row) {
* Called every 5 ingame ticks, this should be used to perform various performance intensive methods.
*/
public void periodicalTicks5() {
CookiesUtils.sendMessage(Text.literal("" + (-200+(32 * dungeonMap.getRoomsInX()))), true);

if (this.getPhase() == DungeonPhase.BLOOD &&
(this.getPlayerPosition().x > 0 || this.getPlayerPosition().z > 0)) {
(this.getPlayerPosition().x > -200+(32 * dungeonMap.getRoomsInX()) || this.getPlayerPosition().z > -200+(32 * dungeonMap.getRoomsInY()))) {
this.setPhase(DungeonPhase.BOSS);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public int getHeight() {

@Override
public int getWidth() {
System.out.println(getTextRenderer().getWidth(this.name) + 26 + this.maxButtonWidth);
return getTextRenderer().getWidth(this.name) + 26 + this.maxButtonWidth;
}

Expand Down

0 comments on commit 2ad261d

Please sign in to comment.