aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl')
-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
3 files changed, 76 insertions, 1 deletions
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;
+ }
+ }
+}