Skip to content

Commit

Permalink
Merge branch 'Skytils:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zealerker22 committed Aug 18, 2024
2 parents 8bf938d + 4228f9a commit 8e0a23b
Show file tree
Hide file tree
Showing 27 changed files with 216 additions and 135 deletions.
16 changes: 10 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ plugins {
signing
}

version = "1.10.0-pre9"
version = "1.10.3"
group = "gg.skytils"

repositories {
Expand Down Expand Up @@ -116,7 +116,7 @@ dependencies {
}

shadowMe(platform(kotlin("bom")))
shadowMe(platform(ktor("bom", "2.3.11", addSuffix = false)))
shadowMe(platform(ktor("bom", "2.3.12", addSuffix = false)))

shadowMe(ktor("serialization-kotlinx-json"))

Expand Down Expand Up @@ -154,11 +154,15 @@ dependencies {
exclude(module = "bcprov-jdk18on")
}
compileOnly("org.bouncycastle:bcprov-jdk18on:1.78.1")
shadowMe("net.hypixel:mod-api:0.4.0")


shadowMe(annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5")!!)
annotationProcessor("org.spongepowered:mixin:0.8.5:processor")
compileOnly("net.hypixel:mod-api-forge:1.0.1.1") {
exclude(group = "me.djtheredstoner", module = "DevAuth-forge-legacy")
}
shadowMe("net.hypixel:mod-api-forge-tweaker:1.0.1.1")

shadowMe(annotationProcessor("io.github.llamalad7:mixinextras-common:0.5.0-beta.2")!!)
annotationProcessor("org.spongepowered:mixin:0.8.7:processor")
compileOnly("org.spongepowered:mixin:0.8.5")
}

Expand Down Expand Up @@ -222,7 +226,7 @@ tasks {
relocate("kotlinx.serialization", "gg.skytils.ktx-serialization")
relocate("kotlinx.coroutines", "gg.skytils.ktx-coroutines")
relocate("gg.essential.vigilance", "gg.skytils.vigilance")
relocate("net.hypixel", "gg.skytils.hypixel-net")
relocate("net.hypixel.modapi.tweaker", "gg.skytils.hypixel-net.modapi.tweaker")

exclude(
"**/LICENSE_MixinExtras",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ private void onSendPacket(Packet<?> packet, CallbackInfo ci) {
@Inject(method = "handleSpawnMob", at = @At("TAIL"))
private void onHandleSpawnMobTail(S0FPacketSpawnMob packetIn, CallbackInfo ci) {
Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID());
MasterMode7Features.INSTANCE.onMobSpawned(entity);
((ExtensionEntityLivingBase) entity).getSkytilsHook().onNewDisplayName(
entity.getDataWatcher().getWatchableObjectString(2)
);
if (entity != null) {
MasterMode7Features.INSTANCE.onMobSpawned(entity);
((ExtensionEntityLivingBase) entity).getSkytilsHook().onNewDisplayName(
entity.getDataWatcher().getWatchableObjectString(2)
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
package gg.skytils.skytilsmod.tweaker;

import gg.essential.loader.stage0.EssentialSetupTweaker;
import net.hypixel.modapi.tweaker.HypixelModAPITweaker;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.launchwrapper.LaunchClassLoader;
import net.minecraftforge.fml.relauncher.FMLSecurityManager;

Expand Down Expand Up @@ -53,6 +55,10 @@ public void acceptOptions(List<String> args, File gameDir, File assetsDir, Strin
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader) {
super.injectIntoClassLoader(classLoader);

@SuppressWarnings("unchecked")
List<String> tweakClassNames = (List<String>) Launch.blackboard.get("TweakClasses");
tweakClassNames.add(HypixelModAPITweaker.class.getName());
}

@Override
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/gg/skytils/skytilsmod/Skytils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ class Skytils {
cch.registerCommand(FragBotCommand)
cch.registerCommand(HollowWaypointCommand)
cch.registerCommand(ItemCycleCommand)
cch.registerCommand(LimboCommand)
cch.registerCommand(OrderedWaypointCommand)
cch.registerCommand(ScamCheckCommand)
cch.registerCommand(SlayerCommand)
Expand Down

This file was deleted.

38 changes: 34 additions & 4 deletions src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1132,14 +1132,24 @@ object Config : Vigilant(

@Property(
type = PropertyType.SWITCH, name = "Boulder Solver",
description = "§b[WIP] §rShow which boxes to move on the Boulder puzzle.",
description = "Show which boxes to move on the Boulder puzzle.",
category = "Dungeons", subcategory = "Solvers",
i18nName = "skytils.config.dungeons.solvers.boulder_solver",
i18nCategory = "skytils.config.dungeons",
i18nSubcategory = "skytils.config.dungeons.solvers"
)
var boulderSolver = false

@Property(
type = PropertyType.COLOR, name = "Boulder Solver Color",
description = "Color of the box that shows which button to click in the Boulder puzzle.",
category = "Dungeons", subcategory = "Solvers",
i18nName = "skytils.config.dungeons.solvers.boulder_solver_color",
i18nCategory = "skytils.config.dungeons",
i18nSubcategory = "skytils.config.dungeons.solvers"
)
var boulderSolverColor = Color(255, 0, 0, 255)

@Property(
type = PropertyType.SWITCH, name = "Creeper Beams Solver",
description = "Shows pairs on the Creeper Beams puzzle.",
Expand Down Expand Up @@ -1182,7 +1192,7 @@ object Config : Vigilant(

@Property(
type = PropertyType.COLOR, name = "Teleport Maze Solver Color",
description = "Color of the thing that shows which pads you've stepped on in the Teleport Maze puzzle.",
description = "Color of the box that shows which pads you've stepped on in the Teleport Maze puzzle.",
category = "Dungeons", subcategory = "Solvers",
i18nName = "skytils.config.dungeons.solvers.teleport_maze_solver_color",
i18nCategory = "skytils.config.dungeons",
Expand All @@ -1200,9 +1210,19 @@ object Config : Vigilant(
)
var threeWeirdosSolver = false

@Property(
type = PropertyType.COLOR, name = "Three Weirdos Solver Color",
description = "Color of the chest to click on the Three Weirdos puzzle.",
category = "Dungeons", subcategory = "Solvers",
i18nName = "skytils.config.dungeons.solvers.three_weirdos_solver_color",
i18nCategory = "skytils.config.dungeons",
i18nSubcategory = "skytils.config.dungeons.solvers"
)
var threeWeirdosSolverColor = Color(255, 0, 0, 255)

@Property(
type = PropertyType.SWITCH, name = "Tic Tac Toe Solver",
description = "§b[WIP] §rDisplays the best move on the Tic Tac Toe puzzle.",
description = "Displays the best move on the Tic Tac Toe puzzle.",
category = "Dungeons", subcategory = "Solvers",
i18nName = "skytils.config.dungeons.solvers.tic_tac_toe_solver",
i18nCategory = "skytils.config.dungeons",
Expand All @@ -1212,7 +1232,7 @@ object Config : Vigilant(

@Property(
type = PropertyType.COLOR, name = "Tic Tac Toe Solver Color",
description = "Color of the thing that displays the best move on the Tic Tac Toe puzzle.",
description = "Color of the outline that displays the best move on the Tic Tac Toe puzzle.",
category = "Dungeons", subcategory = "Solvers",
i18nName = "skytils.config.dungeons.solvers.tic_tac_toe_solver_color",
i18nCategory = "skytils.config.dungeons",
Expand Down Expand Up @@ -3470,6 +3490,16 @@ object Config : Vigilant(
)
var useSlayerHitMethod = true

@Property(
type = PropertyType.SWITCH, name = "Use Nametag to Detect Slayer",
description = "Finds your slayer based on the nametag.",
category = "Slayer", subcategory = "General",
i18nName = "skytils.config.slayer.general.use_nametag_to_detect_slayer",
i18nCategory = "skytils.config.slayer",
i18nSubcategory = "skytils.config.slayer.general"
)
var useNametagHitMethod = false

@Property(
type = PropertyType.SWITCH, name = "Ping when in Atoned Horror Danger Zone",
description = "Pings when you are standing on the Atoned Horror's TNT target.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object DungeonChestProfit {
private val element = DungeonChestProfitElement()
private var rerollBypass = false
private val essenceRegex = Regex("§d(?<type>\\w+) Essence §8x(?<count>\\d+)")
private val croesusChestRegex = Regex("^(Master Mode|The)? Catacombs - Floor (IV|V?I{0,3})$")
private val croesusChestRegex = Regex("^(Master Mode )?The Catacombs - Flo(or (IV|V?I{0,3}))?$")

@SubscribeEvent
fun onGUIDrawnEvent(event: GuiContainerEvent.ForegroundDrawnEvent) {
Expand Down Expand Up @@ -126,7 +126,7 @@ object DungeonChestProfit {
val stack = event.slot.stack ?: return
if (stack.item == Items.skull) {
val name = stack.displayName
if (!(name == "§cThe Catacombs" || name == "§cMaster Mode Catacombs")) return
if (!(name == "§cThe Catacombs" || name == "§cMaster Mode The Catacombs")) return
val lore = ItemUtil.getItemLore(stack)
event.slot highlight when {
lore.any { line -> line == "§aNo more Chests to open!" } -> {
Expand Down Expand Up @@ -325,4 +325,4 @@ object DungeonChestProfit {
Skytils.guiManager.registerElement(this)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ object ScoreCalculation {
init {
tickTimer(5, repeats = true) {
isPaul.set(
(MayorInfo.currentMayor == "Paul" && MayorInfo.mayorPerks.contains("EZPZ")) || MayorInfo.jerryMayor?.name == "Paul"
(MayorInfo.allPerks.contains("EZPZ")) || MayorInfo.jerryMayor?.name == "Paul"
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ object CatlasConfig : Vigilant(
type = PropertyType.SELECTOR,
description = "Shows names of rooms on map.",
category = "Rooms",
options = ["None", "Puzzles / Trap", "All"],
options = ["None", "Puzzles", "Puzzles / Trap", "All"],
i18nName = "catlas.config.rooms..room_names",
i18nCategory = "catlas.config.rooms"
)
var mapRoomNames = 1
var mapRoomNames = 2

@Property(
name = "Center Room Names",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,10 @@ object CatlasElement : GuiElement(name = "Dungeon Map", x = 0, y = 0) {

val name = mutableListOf<String>()

if (CatlasConfig.mapRoomNames != 0 && Utils.equalsOneOf(
roomType,
RoomType.PUZZLE,
RoomType.TRAP
) || CatlasConfig.mapRoomNames == 2 && Utils.equalsOneOf(
if ((CatlasConfig.mapRoomNames != 0 && roomType == RoomType.PUZZLE) || (CatlasConfig.mapRoomNames >= 2 && roomType == RoomType.TRAP) || (CatlasConfig.mapRoomNames == 3 && Utils.equalsOneOf(
roomType,
RoomType.NORMAL, RoomType.RARE, RoomType.CHAMPION
)
))
) {
name.addAll(room.data.name.split(" "))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Room(override val x: Int, override val z: Int, var data: RoomData) : Tile
else -> CatlasConfig.colorRoom
}
}
var uniqueRoom: UniqueRoom? = null

fun getArrayPosition(): Pair<Int, Int> {
return Pair((x - DungeonScanner.startX) / 16, (z - DungeonScanner.startZ) / 16)
Expand All @@ -51,9 +52,13 @@ class Room(override val x: Int, override val z: Int, var data: RoomData) : Tile
val unique = DungeonInfo.uniqueRooms.find { it.name == roomName }

if (unique == null) {
DungeonInfo.uniqueRooms.add(UniqueRoom(column, row, this))
UniqueRoom(column, row, this).let {
DungeonInfo.uniqueRooms.add(it)
uniqueRoom = it
}
} else {
unique.addTile(column, row, this)
uniqueRoom = unique
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ object MapUpdater {

if (mapTile.state.ordinal < room.state.ordinal) {
room.state = mapTile.state
if (room is Room && room.state == RoomState.GREEN) {
room.uniqueRoom?.foundSecrets = room.uniqueRoom?.foundSecrets?.coerceAtLeast(room.data.secrets)
}
}

if (mapTile is Door && room is Door) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ object BoulderSolver {
RenderUtil.drawFilledBoundingBox(
matrixStack,
AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1),
Color(255, 0, 0, 255),
Skytils.config.boulderSolverColor,
0.7f
)
GlStateManager.enableCull()
Expand Down Expand Up @@ -379,4 +379,4 @@ object BoulderSolver {
)
variantSteps.add(arrayListOf(BoulderPush(0, 1, Direction.FORWARD)))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,45 @@ object IceFillSolver {
val pos = te.pos
if (world.getBlockState(pos.down()).block == Blocks.stone) {
for (direction in EnumFacing.HORIZONTALS) {
if (world.getBlockState(pos.offset(direction)).block == Blocks.cobblestone && world.getBlockState(
pos.offset(direction.opposite, 2)
).block == Blocks.iron_bars && world.getBlockState(
fun checkChestTorches(dir: EnumFacing): Boolean {
return world.getBlockState(
pos.offset(
direction.rotateY(),
2
dir,
1
)
).block == Blocks.torch && world.getBlockState(
pos.offset(
direction.rotateYCCW(),
2
dir.opposite,
3
)
).block == Blocks.torch && world.getBlockState(
pos.offset(direction.opposite).down(2)
).block == Blocks.stone_brick_stairs
) {
puzzles = Triple(
IceFillPuzzle(world, 70, pos, direction),
IceFillPuzzle(world, 71, pos, direction),
IceFillPuzzle(world, 72, pos, direction)
)
println(
"Ice fill chest is at $pos and is facing $direction"
)
break@findChest
).block == Blocks.torch
}

if (world.getBlockState(pos.offset(direction)).block == Blocks.cobblestone && world.getBlockState(
pos.offset(direction.opposite, 2)
).block == Blocks.iron_bars) {

val offsetDir: EnumFacing? = if (checkChestTorches(direction.rotateY())) {
direction.rotateYCCW()
} else if (checkChestTorches(direction.rotateYCCW())) {
direction.rotateY()
} else continue

if (world.getBlockState(
pos.offset(direction.opposite)
.offset(offsetDir)
.down(2)
).block == Blocks.stone_brick_stairs) {
puzzles = Triple(
IceFillPuzzle(world, 70, pos, direction),
IceFillPuzzle(world, 71, pos, direction),
IceFillPuzzle(world, 72, pos, direction)
)
println(
"An Ice Fill chest is at $pos and is facing $direction. Offset direction is $offsetDir."
)
break@findChest
}
}
}
}
Expand Down
Loading

0 comments on commit 8e0a23b

Please sign in to comment.