Quieter blocks

This commit is contained in:
Vos
2025-11-16 20:40:09 -06:00
parent a439924489
commit fd5cb85e47
2 changed files with 10 additions and 4 deletions
@@ -47,11 +47,11 @@ public class EntropyBlock extends Block {
itemEntity.setStack(new ItemStack(itemEntity.getStack().getItem(), itemEntity.getStack().getCount() - 1));
if (chance == 20) {
world.playSound(itemEntity, pos, SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, SoundCategory.BLOCKS, 10f, 1f);
world.playSound(itemEntity, pos, SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, SoundCategory.BLOCKS, 1f, 1f);
ItemEntity convItem = new ItemEntity(world, itemEntity.getX(), itemEntity.getY(), itemEntity.getZ(), new ItemStack(Registries.ITEM.get(Identifier.of(AcesBS.MOD_ID, "lemon")), 1));
world.spawnEntity(convItem);
} else {
world.playSound(itemEntity, pos, SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.BLOCKS, 10f, 1f);
world.playSound(itemEntity, pos, SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.BLOCKS, 1f, 1f);
}
}
}
@@ -62,7 +62,10 @@ public class EntropyBlock extends Block {
// 1d is roughly 4.5 blocks worth of upward velocity
entity.addVelocity(randomVelocityX, randomVelocityY, randomVelocityZ);
world.playSound(entity, pos, SoundEvents.ENTITY_ENDERMAN_HURT, SoundCategory.BLOCKS, 10f, 0.4f);
if (entity instanceof PlayerEntity){
world.playSound(entity, pos, SoundEvents.ENTITY_ENDERMAN_HURT, SoundCategory.BLOCKS, 1f, 0.4f);
}
super.onSteppedOn(world, pos, state, entity);
}
@@ -4,6 +4,7 @@ import com.acethewildfire.acesbs.AcesBS;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.tooltip.TooltipType;
@@ -36,7 +37,9 @@ public class StableEntropyBlock extends Block {
if (!entity.isInSneakingPose()){
// 1d is roughly 4.5 blocks worth of upward velocity
entity.addVelocity(0d, 1d, 0d);
world.playSound(entity, pos, SoundEvents.ENTITY_ENDERMAN_AMBIENT, SoundCategory.BLOCKS, 10f, 0.4f);
if (entity instanceof PlayerEntity) {
world.playSound(entity, pos, SoundEvents.ENTITY_ENDERMAN_AMBIENT, SoundCategory.BLOCKS, 1f, 0.4f);
}
super.onSteppedOn(world, pos, state, entity);
}
}