1.15.2 Custom Entities just arent clicking with me..

Discussion in 'Spigot Plugin Development' started by hidden1nin, Feb 22, 2020.

  1. I don't understand how custom entities work, everything im finiding is from around 1.7 so its mostly out of date information. Can someone walk me through step by step on creating an entity? i wanted to make a spider thats aggro even during the day and the guide i was rewading wasnt working so i just want to learn it from the ground up.
     
  2. Creating custom entities invloves messing with nms code which is not supported and not all people know how to use. I don't think anyone will walk you step by step. For the most part, the things that change across versions are the obfuscated names so it shouldn't be that hard to fix (if you already have working code from older versions) especially now that mojang has released the obfuscation maps.
     
  3. I know that they can be created via classes that extend entities, i just want to overwrite a spiders target method and have it attack during day
     
  4. Try this:
    Listen the event: EntityTargetLivingEntityEvent
    Check if entity is a Spider (not target), then use the getTime() method to see if it's night and event.setCancelled(true).

    That might work, the spiders won't target players therefore they'll not attack them during night.
     
  5. That’s totally not what he’s trying to do though. He’s trying to make the spiders aggro during day time, not passive during night time.
     
  6. Judging by some of your recent questions in this subforum, I'd suggest holding off on using NMS until you have a little more experience. Trust me, it's for your own sanity :p
    If you insist though, take a look at this thread where I helped a fellow out with this: https://www.spigotmc.org/threads/adding-a-custom-entity-into-the-game.415812/
    Make sure to read carefully. I made a few mistakes myself at first.