More specific enumerator than EntityType?

Discussion in 'Plugin Development' started by evilmidget38, Jun 20, 2012.

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

    evilmidget38

    I'm looking for a more specific enumerator that EntityType for mobs. This would be primarily for keeping track of a group of mobs to spawn, and I don't want to end up somehow trying to spawn an arrow, a falling block, or something like that.

    If there isn't one, I've got no objection to making my own enum, just wanted to check first.
     
  2. Offline

    dxwarlock

    can you use entity.Monster?
     
  3. Offline

    evilmidget38

    I'm not quite sure what you mean by that.

    Anyways, I think I solved my problem(classic, I ask it and solve it a few minutes later). Using EntityType's .isSpawnable() should work.
     
  4. Offline

    dxwarlock

    ah, thought you was trying to see if the entity was an "instance of" some type of monster.

    so like
    final Entity e = event.(whatever event type to get it);
    if ( e instanceof Monster) {}
     
  5. Offline

    evilmidget38

    Yeah, that would also work. I'll look at the documentation and decide which is better.
     
  6. Offline

    dxwarlock

    had to change it, I copied and deleted some code from what I had which broke what I was trying to say..so need to be "EntityType", not "Entity" to check if instance of :)
     
Thread Status:
Not open for further replies.

Share This Page