GenuineSounds

SparrowAPI

Jun 6th, 2012
230
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.88 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. public interface SparrowAPI {
  4.     /**
  5.      * Is this thing like a creeper, in that engaging it in combat has
  6.      * unexpected consequences? Would this entity and its allies be better off
  7.      * not fighting it at all? Set this to true if the attacker's combat
  8.      * abilities are basically a non-factor in what will happen to it if it
  9.      * fights this.
  10.      */
  11.     public boolean isStupidToAttack();
  12.  
  13.     /**
  14.      * When a mod triggers an event that would set an entity to be dead with no
  15.      * reference to damage, should this entity be spared?
  16.      */
  17.     public boolean doNotVaporize();
  18.  
  19.     /** Does this entity attack non-player entities on sight? */
  20.     public boolean isPredator();
  21.  
  22.     /** Does this entity attack the player on sight? */
  23.     public boolean isHostile();
  24.  
  25.     /** Is this entity incapable of combat? */
  26.     public boolean isPeaceful();
  27.  
  28.     /** Is this entity viable prey for a predator? */
  29.     public boolean isPrey();
  30.  
  31.     /** Will this entity attack, but only when provoked? */
  32.     public boolean isNeutral();
  33.  
  34.     /** Is this entity incapable of taking damage, and thus pointless to attack? */
  35.     public boolean isUnkillable();
  36.  
  37.     /** Should this entity be considered a threat to par1entity? */
  38.     public boolean isThreatTo(Entity par1entity);
  39.  
  40.     /** Should this entity be considered a friend of par1entity? */
  41.     public boolean isFriendOf(Entity par1entity);
  42.  
  43.     /** Is this entity what people would generally consider to be an NPC? */
  44.     public boolean isNPC();
  45.  
  46.     /** Is this a pet? 0 if not, 1 if it can be but isn't currently, 2 if it is. */
  47.     public int isPet();
  48.  
  49.     /** Who is this pet's owner? */
  50.     public Entity getPetOwner();
  51.  
  52.     /** What is the name of this individual entity? */
  53.     public String getName();
  54.  
  55.     /**
  56.      * What is this entity currently targeting with intent to kill? Used to
  57.      * differentiate between the attack method monsters use and the attack
  58.      * method used for breeding and following
  59.      */
  60.     public Entity getAttackingTarget();
  61.  
  62.     /**
  63.      * What is the size of this entity? Multiply its two dimensions (X and Z are
  64.      * considered the same) in terms of blocks and put in the result ( a chicken
  65.      * would be .3 * .7, which is roughly .2)
  66.      */
  67.     public float getSize();
  68.  
  69.     /**
  70.      * What should this entity be referred to as? (Dog, Cat, Human, Enderman,
  71.      * etc.)
  72.      */
  73.     public String getSpecies();
  74.  
  75.     /** What is this entity's gender? 1 for male, 2 for female, 0 for neither */
  76.     public int getGender();
  77.  
  78.     /**
  79.      * This is for mod-specific features. A mod can search for a response to a
  80.      * custom string, and you can add in whether or not they'll respond to it
  81.      * here, and what the response will be.
  82.      */
  83.     public String customStringAndResponse(String s);
  84.  
  85.     /**
  86.      * Have this return the string you store your simplyID in. Use the function
  87.      * SimplyID.getNextSimplyID(this) to assign a simplyID to your entities that
  88.      * implement Sparrow.
  89.      */
  90.     public String getSimplyID();
  91. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment