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.

Entity

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

EntityLiving

  • 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)

Weather

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

2 comments:

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

    ReplyDelete
  2. You should check this RPG npc mod: http://www.minecraftforum.net/viewtopic.php?f=1032&t=108984&sid=b98a6f8dad07cb370e6ab1c27bcc5247

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

    ReplyDelete