EntityAnimal not showing Breeding(Heart) Particles

Discussion in 'Spigot Plugin Development' started by KuramaStone, Apr 27, 2017.

  1. Hello I am trying to code a method in which to set an EntityAnimal to breed. I have sucessfully started their breeding process however the breeding particle (Hearts) are not appearing. They appear when I give an EntityAnimal their normal breeding item (Such as wheat). I am aware that this could be done by getting the EntityAnimal's bukkit entity, but I am challenging myself to only use NMS during my coding of AI.

    This is the method in which I've set the entity to breeding:
    Code (Text):
        private void setBreeding() {
            NBTTagCompound nbttagcompound = new NBTTagCompound();
            this.d.b(nbttagcompound); // Copies entity nbt data to tag
            nbttagcompound.setInt("InLove", 300 + this.d.bc().nextInt(300)); // sets InLove tag to a number between 300 and 600
            this.d.a(nbttagcompound); // Sets the nbt tag to entity
  2. sothatsit


    The NMS is a beautiful, but unwieldy and hard to understand thing. As such, if you wish to code this completely using NMS you will need to learn to look through it's code base and find for yourself how and why things are happening the way they are. I would suggest Konloch's bytecode viewer to decompile the server so you can easily take a look around at its source. Playing with NMS is not easy, and as such it is rare that you will get quick help from this forum with it.