Solved NMS - Cannot change custom entity sounds

Discussion in 'Plugin Development' started by VortexGmer, Apr 23, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    So I have a custom entity which is a zombie (I called it custom cow) and I want to change the sounds to a cow's sounds

    Whenever I try

    protected String t(){
        return "mob.cow.say";
    }protected String aT(){
        return "mob.cow.hurt";
    }protected String aU(){
        return "mob.cow.death";
    However this does not work and aT() is a error with return type as boolean.
    Here is my source:
    Any Help?
  2. Offline


    @VortexGmer Are you sure those are the methods for the version you're using in your server and compilation time?

    Remember that NMS methods and attributes can change from one version to another, so they might not be the ones for the version you have.
  3. Offline


    Well how can i check? I looked at the github and thats all i know
    I use spigot 1.9.2 so where can i find the info?
    I found this code:
    protected SoundEffect G() {
    return isVillager() ? SoundEffects.hw : SoundEffects.hh;
    protected SoundEffect bR() {
    return isVillager() ? SoundEffects.hA : SoundEffects.hp;
    protected SoundEffect bS() {
    return isVillager() ? SoundEffects.hz : SoundEffects.hl;
    protected void a(BlockPosition blockposition, Block block) {
    a(isVillager() ? SoundEffects.hB : SoundEffects.hv, 0.15F, 1.0F);
    But I don't know how to return the correct soundeffects, How to do this?
    Is it :
    SoundEffect.a.get(new MinecraftKey("entity.cow.ambient"))?
    Any help
    EDIT 2: IT IS SoundEffect.a.get(new MinecraftKey("entity.cow.ambient"))!
    Thanks Konoko for helping
    Last edited: Apr 24, 2016
  4. Offline


    @VortexGmer If it was me, i would either decompile the spigot jar using JDGUI, then navigate to the EntityZombie class, and look at the updated methods, or find javadocs for the spigot version you are using. The current methods you are using are for 1.7.10.
Thread Status:
Not open for further replies.

Share This Page