Fixed spiders generating ladder noises and updating the build's version

master
Wynd 2024-09-10 00:48:21 +03:00
parent e4d3f10587
commit 0f391bb92e
3 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,6 @@ plasma_build=22
api_version=1.1.0.1
# Mod Properties
mod_version = 1.2.0
mod_version = 1.3.0
maven_group = xyz.pixelatedw.finalbeta
archives_base_name = finalbeta

View File

@ -11,6 +11,7 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.animal.Chicken;
import net.minecraft.entity.animal.Pig;
import net.minecraft.entity.monster.Ghast;
import net.minecraft.entity.monster.Spider;
import net.minecraft.entity.player.Player;
import net.minecraft.entity.projectile.Snowball;
import net.minecraft.item.ItemType;
@ -55,7 +56,8 @@ public class LivingEntityMixin {
@Inject(method = "travel", at = @At("HEAD"))
public void travel(float f, float f1, CallbackInfo ci) {
LivingEntity entity = (LivingEntity) (Object) this;
if (ModConfig.ADD_MORE_SOUNDS.get() && entity.isOnLadder() && (entity.velocityY > 0.1 || entity.velocityY < -0.1) && entity.field_1645 % 15 == 0 && !entity.onGround) {
if (ModConfig.ADD_MORE_SOUNDS.get() && entity.isOnLadder() && !(entity instanceof Spider)
&& (entity.velocityY > 0.1 || entity.velocityY < -0.1) && entity.field_1645 % 15 == 0 && !entity.onGround) {
float pitch = WyHelper.clamp(0.85f + entity.level.rand.nextFloat() / 2, 0.0f, 1.0f);
entity.level.playSound(entity.x, entity.y, entity.z, "sound3.step.ladder", 0.3f, pitch);
}

View File

@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "finalbeta",
"version": "1.2.0",
"version": "1.3.0",
"name": "Final Beta",
"description": "A (Cursed) Fabric mod that adds some quality of life changes and fixes some common issues",