Sunday, April 24, 2011

New Scripting Commands

Mob Spawner scripts have a variable set for them called spawnedEntities that is a list of currently alive spawned entities for the spawner.  Also note that all scripts are global to each other so variables set by one can be read by another.  Currently the scope isn't persisted between saving and loading but will be in the future.


  • ScriptEntity[] getEntitiesWithinRange(double dist)
  • ScriptEntity getMountedEntity()


  • playLivingSound()
  • spawnExplosionParticle()
  • heal(int i)
  • attackEntityFrom(ScriptEntity e, int i)
  • isOnLadder()
  • ScriptEntity getTarget()
  • ScriptVec3 getLookVec()
  • int getHealth()
  • setHealth(int i)
  • int getMaxHealth()
  • setMaxHealth(int i)


  • setPrecipitating(boolean precipate)
  • boolean getPrecipitating()
  • setTemperatureOffset(double tempOffset)
  • double getTemperatureOffset()


  1. so what happens if i set 'precipate' to true and turn 'tempOffset' to 10.5? It will snow?

  2. You should check this RPG npc mod:

    It fits well with adventure craft, and you could contact the owner to see if he is ok with letting you include it.