aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java18
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java7
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java38
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDecreaseExplosionSound.java37
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/listener/SoundListener.java7
7 files changed, 107 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java
index a66ab6f9..78a3bb9d 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandReparty.java
@@ -69,10 +69,12 @@ public class CommandReparty extends CommandBase {
String txt = e.message.getFormattedText();
if (txt.startsWith("§eParty ") && txt.contains(":")) {
String playerNames = TextUtils.stripColor(txt.split(":")[1]);
+ String myname = Minecraft.getMinecraft().getSession().getUsername();
for (String s : playerNames.split(" ")) {
if (s.isEmpty()) continue;
if (s.equals("●")) continue;
if (s.startsWith("[")) continue;
+ if (s.equalsIgnoreCase(myname)) continue;
players.add(s);
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java
index 1e134321..70393e3c 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java
@@ -9,6 +9,7 @@ import kr.syeyoung.dungeonsguide.features.AbstractFeature;
import kr.syeyoung.dungeonsguide.features.listener.*;
import net.minecraft.client.Minecraft;
import net.minecraftforge.client.event.*;
+import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
@@ -49,6 +50,23 @@ public class FeatureListener {
t.printStackTrace();
}
}
+
+ @SubscribeEvent
+ public void onSound(PlaySoundEvent soundEvent) {
+ try {
+ SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus();
+ if (!skyblockStatus.isOnSkyblock()) return;
+
+ for (AbstractFeature abstractFeature : FeatureRegistry.getFeatureList()) {
+ if (abstractFeature instanceof SoundListener) {
+ ((SoundListener) abstractFeature).onSound(soundEvent);
+ }
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
@SubscribeEvent
public void onRender(RenderLivingEvent.Post preRender) {
try {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
index 9aa01b72..38ad9b7f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java
@@ -63,6 +63,7 @@ public class FeatureRegistry {
public static final FeatureTooltipPrice ETC_PRICE = register(new FeatureTooltipPrice());
public static final FeatureCooldownCounter ETC_COOLDOWN = register(new FeatureCooldownCounter());
public static final FeatureRepartyCommand ETC_REPARTY = register(new FeatureRepartyCommand());
+ public static final FeatureDecreaseExplosionSound ETC_EXPLOSION_SOUND = register(new FeatureDecreaseExplosionSound());
public static final SimpleFeature FIX_SPIRIT_BOOTS = register(new SimpleFeature("Fixes", "Spirit Boots Fixer", "Fix Spirit boots messing up with inventory", "fixes.spirit", true));
public static final FeatureDisableMessage FIX_MESSAGES = register(new FeatureDisableMessage());
@@ -87,6 +88,7 @@ public class FeatureRegistry {
public static final FeatureBoxSkelemaster DUNGEON_BOXSKELEMASTER = register(new FeatureBoxSkelemaster());
public static final FeatureBoxBats DUNGEON_BOXBAT = register(new FeatureBoxBats());
public static final FeatureBoxStarMobs DUNGEON_BOXSTARMOBS = register(new FeatureBoxStarMobs());
+ public static final FeatureWatcherWarning DUNGEON_WATCHERWARNING = register(new FeatureWatcherWarning());
public static final FeatureDungeonDeaths DUNGEON_DEATHS = register(new FeatureDungeonDeaths());
public static final FeatureDungeonMilestone DUNGEON_MILESTONE = register(new FeatureDungeonMilestone());
public static final FeatureDungeonRealTime DUNGEON_REALTIME = register(new FeatureDungeonRealTime());
@@ -97,9 +99,8 @@ public class FeatureRegistry {
public static final FeatureDungeonScore DUNGEON_SCORE = register(new FeatureDungeonScore());
public static final FeatureWarnLowHealth DUNGEON_LOWHEALTH_WARN = register(new FeatureWarnLowHealth());
public static final SimpleFeature DUNGEON_INTERMODCOMM = register(new SimpleFeature("Dungeon", "Communicate With Other's Dungeons Guide", "Sends total secret in the room to others\nSo that they can use the data to calculate total secret in dungeon run\n\nThis automates player chatting action, (chatting data) Thus it might be against hypixel's rules.\nBut mods like auto-gg which also automate player action and is kinda allowed mod exist so I'm leaving this feature.\nThis option is use-at-your-risk and you'll be responsible for ban if you somehow get banned because of this feature\n(Although it is not likely to happen)\nDefaults to off", "dungeon.intermodcomm", false));
- public static final FeaturePlayerESP DUNGEON_PLEYARESP = register(new FeaturePlayerESP());
- public static final FeatureWatcherWarning DUNGEON_WATCHERWARNING = register(new FeatureWatcherWarning());
-
+ public static final FeaturePlayerESP DUNGEON_PLAYERESP = register(new FeaturePlayerESP());
+ public static final FeatureHideNameTags DUNGEON_HIDENAMETAGS = register(new FeatureHideNameTags());
public static final FeatureMechanicBrowse SECRET_BROWSE = register(new FeatureMechanicBrowse());
public static final FeatureActions SECRET_ACTIONS = register(new FeatureActions());
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java
index 66399235..743b9f35 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureHideAnimals.java
@@ -19,7 +19,7 @@ import net.minecraftforge.client.event.RenderLivingEvent;
public class FeatureHideAnimals extends SimpleFeature implements EntityLivingRenderListener {
public FeatureHideAnimals() {
- super("Bossfight", "Hide animals on f4", "Hide Soirit Animals on F4. \nClick on Edit for precise setting", "bossfight.hideanimals", false);
+ super("Bossfight", "Hide animals on f4", "Hide Spirit Animals on F4. \nClick on Edit for precise setting", "bossfight.hideanimals", false);
parameters.put("sheep", new FeatureParameter<Boolean>("sheep", "Hide Sheeps", "Hide Sheeps", true, "boolean"));
parameters.put("cow", new FeatureParameter<Boolean>("cow", "Hide Cows", "Hide Cows", true, "boolean"));
parameters.put("chicken", new FeatureParameter<Boolean>("chicken", "Hide Chickens", "Hide Chickens", true, "boolean"));
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java
new file mode 100644
index 00000000..d5476bc8
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureHideNameTags.java
@@ -0,0 +1,38 @@
+package kr.syeyoung.dungeonsguide.features.impl.dungeon;
+
+import kr.syeyoung.dungeonsguide.SkyblockStatus;
+import kr.syeyoung.dungeonsguide.e;
+import kr.syeyoung.dungeonsguide.features.FeatureParameter;
+import kr.syeyoung.dungeonsguide.features.SimpleFeature;
+import kr.syeyoung.dungeonsguide.features.listener.EntityLivingRenderListener;
+import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessorThorn;
+import net.minecraft.entity.item.EntityArmorStand;
+import net.minecraft.entity.passive.*;
+import net.minecraftforge.client.event.RenderLivingEvent;
+
+
+public class FeatureHideNameTags extends SimpleFeature implements EntityLivingRenderListener {
+ public FeatureHideNameTags() {
+ super("Dungeon", "Hide mob nametags", "Hide mob nametags. Developer personally don't suggest using this, it will be most likely annoying.", "dungeon.hidenametag", false);
+ }
+
+
+ private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus();
+
+ @Override
+ public void onEntityRenderPre(RenderLivingEvent.Pre renderPlayerEvent) {
+ if (!isEnabled()) return;
+ if (!skyblockStatus.isOnDungeon()) return;
+
+ if (renderPlayerEvent.entity instanceof EntityArmorStand) {
+ EntityArmorStand armorStand = (EntityArmorStand) renderPlayerEvent.entity;
+ if (armorStand.getAlwaysRenderNameTag())
+ renderPlayerEvent.setCanceled(true);
+ }
+ }
+
+ @Override
+ public void onEntityRenderPost(RenderLivingEvent.Post renderPlayerEvent) {
+
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDecreaseExplosionSound.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDecreaseExplosionSound.java
new file mode 100644
index 00000000..b6d6e407
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeatureDecreaseExplosionSound.java
@@ -0,0 +1,37 @@
+package kr.syeyoung.dungeonsguide.features.impl.etc;
+
+import kr.syeyoung.dungeonsguide.SkyblockStatus;
+import kr.syeyoung.dungeonsguide.e;
+import kr.syeyoung.dungeonsguide.features.FeatureParameter;
+import kr.syeyoung.dungeonsguide.features.SimpleFeature;
+import kr.syeyoung.dungeonsguide.features.listener.SoundListener;
+import net.minecraft.client.audio.PositionedSoundRecord;
+import net.minecraftforge.client.event.sound.PlaySoundEvent;
+
+public class FeatureDecreaseExplosionSound extends SimpleFeature implements SoundListener {
+ public FeatureDecreaseExplosionSound() {
+ super("ETC", "Decrease Explosion sound effect", "Decreases volume of explosions while on skyblock", "qol.reparty");
+ parameters.put("sound", new FeatureParameter<Float>("sound", "Sound Multiplier %", "The volume of explosion effect will be multiplied by this value. 0~100", 10.0f, "float"));
+ }
+
+ SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus();
+
+ @Override
+ public void onSound(PlaySoundEvent soundEvent) {
+ if (!skyblockStatus.isOnSkyblock()) return;
+
+ if (soundEvent.name.equalsIgnoreCase("random.explode") && soundEvent.result instanceof PositionedSoundRecord) {
+ PositionedSoundRecord positionedSoundRecord = (PositionedSoundRecord) soundEvent.result;
+ PositionedSoundRecord neweff = new PositionedSoundRecord(
+ positionedSoundRecord.getSoundLocation(),
+ positionedSoundRecord.getVolume() * (this.<Float>getParameter("sound").getValue() / 100),
+ positionedSoundRecord.getPitch(),
+ positionedSoundRecord.getXPosF(),
+ positionedSoundRecord.getYPosF(),
+ positionedSoundRecord.getZPosF()
+ );
+
+ soundEvent.result = neweff;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/listener/SoundListener.java b/src/main/java/kr/syeyoung/dungeonsguide/features/listener/SoundListener.java
new file mode 100644
index 00000000..168c87df
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/listener/SoundListener.java
@@ -0,0 +1,7 @@
+package kr.syeyoung.dungeonsguide.features.listener;
+
+import net.minecraftforge.client.event.sound.PlaySoundEvent;
+
+public interface SoundListener {
+ void onSound(PlaySoundEvent playSoundEvent);
+}