You know how people put collars that are equiped with bells on thier pets so they know when they are comming? Well I would like a plug in that makes a ringing sound that origionates from the Villagers and maybe decreases volume as it gets to 5 blocks away from the Villager. I ask for this because I am tired of turning around and gettin spooked by the guys because they sneek up on you! is this not possible or somethin? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
You could actually do it buy making a noteblock sound coming from the location of an NPC. Code: @EventHandler public void onNPCTarget(EntityTargetLivingEntityEvent event) { Entity e = event.getEntity(); if(e instanceof NPC && event.getTarget() intanceof Player) { Player p = (Player) event.getTarget(); p.playNote(e.getLocation, Instrument.PIANO, Note. //Add the note here); } }
I might be able to do this, so you want if the entity get's near the player, for it to play a noteblcok tune?