aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-14 11:11:16 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-14 11:11:16 +0200
commit26c36ab5f0135b50dbe0a983023d80504e2f66b4 (patch)
treee140c4621489e065eade0e7af3c0e5213cd5f259
parentd883b82223a189762c40014ed7dfc640cc06c1c3 (diff)
downloadskyhanni-26c36ab5f0135b50dbe0a983023d80504e2f66b4.tar.gz
skyhanni-26c36ab5f0135b50dbe0a983023d80504e2f66b4.tar.bz2
skyhanni-26c36ab5f0135b50dbe0a983023d80504e2f66b4.zip
add ignore guardian feature
-rw-r--r--src/main/java/at/lorenz/mod/config/Features.java5
-rw-r--r--src/main/java/at/lorenz/mod/dungeon/DungeonCleanEnd.kt13
2 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/at/lorenz/mod/config/Features.java b/src/main/java/at/lorenz/mod/config/Features.java
index 2cc8f6535..917ab3483 100644
--- a/src/main/java/at/lorenz/mod/config/Features.java
+++ b/src/main/java/at/lorenz/mod/config/Features.java
@@ -161,6 +161,11 @@ public class Features {
@ConfigOption(name = "Clean End", desc = "Hide entities and particles after the boss in Floor 1 - 6 has died.")
@ConfigEditorBoolean
public boolean cleanEnd = false;
+
+ @Expose
+ @ConfigOption(name = "Ignore Guardians", desc = "Ignore F3 and M3 guardians from the clean end feature when sneaking. Makes it easier to kill them after the boss died already. Thanks hypixel.")
+ @ConfigEditorBoolean
+ public boolean cleanEndF3IgnoreGuardians = false;
}
public static class Items {
diff --git a/src/main/java/at/lorenz/mod/dungeon/DungeonCleanEnd.kt b/src/main/java/at/lorenz/mod/dungeon/DungeonCleanEnd.kt
index 9d9f1b4d7..04326c598 100644
--- a/src/main/java/at/lorenz/mod/dungeon/DungeonCleanEnd.kt
+++ b/src/main/java/at/lorenz/mod/dungeon/DungeonCleanEnd.kt
@@ -10,6 +10,7 @@ import at.lorenz.mod.utils.LorenzUtils.matchRegex
import net.minecraft.client.Minecraft
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.entity.item.EntityArmorStand
+import net.minecraft.entity.monster.EntityGuardian
import net.minecraft.network.play.server.S1CPacketEntityMetadata
import net.minecraft.network.play.server.S2APacketParticles
import net.minecraftforge.event.world.WorldEvent
@@ -91,6 +92,18 @@ class DungeonCleanEnd {
if (entity == Minecraft.getMinecraft().thePlayer) return
+ if (LorenzMod.feature.dungeon.cleanEndF3IgnoreGuardians) {
+ if (DungeonData.isOneOf("F3", "M3")) {
+ if (entity is EntityGuardian) {
+ if (entity.entityId != lastBossId) {
+ if (Minecraft.getMinecraft().thePlayer.isSneaking) {
+ return
+ }
+ }
+ }
+ }
+ }
+
if (chestsSpawned) {
if (entity is EntityArmorStand) {
if (!entity.hasCustomName()) {