Skip to content

Commit

Permalink
Rip out even more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
glowredman committed Aug 21, 2024
1 parent 9c21121 commit 949521a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ protected void syncConfigOptions() {
//passive
enableRabbit = getBoolean("enableRabbits", catPassive, true, "");
enableBrownMooshroom = getBoolean("enableBrownMooshroom", catPassive, true, "Brown mooshroom variant, the red mooshrooms turn into then when they are hit by lightning.");
enableSquidInk = getBoolean("enableSquidInk", catPassive, true, "Squid now produce a cloud of floating black ink particles when attacked.");

//neutral
enableBees = getBoolean("enableBees", catNeutral, true, "");
Expand All @@ -65,6 +64,7 @@ protected void syncConfigOptions() {
enableVillagerTurnsIntoWitch = getBoolean("enableVillagerTurnsIntoWitch", catMisc, true, "Villagers turn into Witches when struck by lightning");
enableDragonRespawn = getBoolean("enableDragonRespawn", catMisc, true, "Crude implementation of respawning the dragon using four End crystals.");
enableNetherEndermen = getBoolean("enableNetherEndermen", catMisc, true, "Allow endermen to rarely spawn in the Nether");
enableSquidInk = getBoolean("enableSquidInk", catMisc, true, "Squid now produce a cloud of floating black ink particles when attacked.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public class ConfigSounds extends ConfigBase {
public static boolean furnaceCrackling;
public static boolean bonemealing;
public static boolean heavyWaterSplashing;
public static boolean squidSounds;

public static float combatSoundStrongThreshold;

Expand Down Expand Up @@ -151,7 +150,6 @@ protected void syncConfigOptions() {
thornsSounds = getBoolean("thornsSounds", catEntity, true, "New sounds for being hurt by the Thorns enchantment.");
horseEatCowMilk = getBoolean("horseEatCowMilk", catEntity, true, "Sounds for horses eating food and cows being milked.");
heavyWaterSplashing = getBoolean("heavyWaterSplashing", catEntity, true, "Play a more intense splash when the player lands in water at high speeds.");
squidSounds = getBoolean("squidSounds", catEntity, true, "Add squid sounds introduced in 1.9+.");

bookPageTurn = getBoolean("bookPageTurn", catMisc, true, "Changes the click in the book GUI to have a page turn sound instead of the menu click.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ public void livingUpdate(LivingUpdateEvent event) {
sq.motionY = 0.08;
sq.velocityChanged = true;
}

if (ConfigSounds.squidSounds && sq.livingSoundTime == 0 && sq.isInWater() && entity.worldObj.rand.nextDouble() < 0.05) {
playSoundAtEntityRng("entity.squid.say", sq);
}
}


Expand Down Expand Up @@ -238,22 +234,6 @@ public void livingUpdate(LivingUpdateEvent event) {
}
}
}

@SubscribeEvent
public void onLivingDeathEvent(LivingDeathEvent event) {
EntityLivingBase entity = event.entityLiving;
if (!entity.worldObj.isRemote && ConfigSounds.squidSounds && EntitySquid.class.equals(entity.getClass())) {
playSoundAtEntityRng("entity.squid.death", entity);
}
}

private static void playSoundAtEntityRng(String soundName, EntityLivingBase e) {
Random r = e.worldObj.rand;
float v = e.isChild() ? 1.5F : 1.0F;
float pitch = (r.nextFloat() - r.nextFloat()) * 0.2F + v;

e.worldObj.playSoundAtEntity(e, soundName, 0.4F, pitch);
}

@SubscribeEvent
public void onAttackEntityEvent(AttackEntityEvent event) { //Fires when a player presses the attack button on an entity
Expand Down Expand Up @@ -1693,9 +1673,6 @@ public void livingHurtEvent(LivingHurtEvent event) {
}

if (EntitySquid.class.equals(targetEntity.getClass())) {
if (ConfigSounds.squidSounds) {
playSoundAtEntityRng("entity.squid.hurt", targetEntity);
}
World w = targetEntity.worldObj;
Random r = w.rand;
doInk: if (ConfigEntities.enableSquidInk && r.nextDouble() < 0.15 && w instanceof WorldServer serverWorld && targetEntity.isInWater()) {
Expand All @@ -1713,11 +1690,10 @@ public void livingHurtEvent(LivingHurtEvent event) {

EntityLivingBase target = around.get(r.nextInt(around.size()));
if (target != null && target != targetEntity) {
if (w instanceof WorldServer) {
((WorldServer) w).func_147487_a("largesmoke", cx, cy, cz, 5, 0.0, 0.0, 0.0, 0.08);
}
if (ConfigSounds.squidSounds) {
playSoundAtEntityRng("entity.squid.squirt", target);
serverWorld.func_147487_a("largesmoke", cx, cy, cz, 5, 0.0, 0.0, 0.0, 0.08);
if (ConfigMixins.newMobSounds) {
float pitch = (r.nextFloat() - r.nextFloat()) * 0.2F + (target.isChild() ? 1.5F : 1.0F);
w.playSoundAtEntity(target, Reference.MCAssetVer + ":entity.squid.squirt", 0.4F, pitch);
}
if (target.isInWater()) {
PotionEffect activeEff = target.getActivePotionEffect(Potion.blindness);
Expand Down

0 comments on commit 949521a

Please sign in to comment.