1.9 KiB
IScriptEntity.unlockRotation
Parça 16/17 · önceki · sonraki
expiration - For how many ticks will this displayed morph exist on the client side. yaw - Horizontal rotation in degrees. pitch - Vertical rotation in degrees. rotate - Whether attached world morph should replicate entity's rotation (i.e. copy head rotation). player - The player that only should see the morph, or null for everyone.
shootBBGunProjectile
IScriptEntity shootBBGunProjectile(java.lang.String gunPropsNBT)
Spawn a BB gun projectile. It works only if Blockbuster mod is present.
ProTip: To get the gun props' NBT code, configure a desired BB gun, and grab it into you main hand. Execute /item_nbt false command in the chat, paste the NBT into the script, and remove {Gun: in the beginning and a } in the end.
c.getSubject().shootBBGunProjectile('{Gun:{Damage:1.0f,Projectile:{Meta:0b,Block:"minecraft:stone",Name:"block"},Gravity:0.0f}}')
executeCommand
void executeCommand(java.lang.String command)
Executes a command as a entity.
function main(c) { c.getSubject().executeCommand("/kill"); }
executeScript
void executeScript(java.lang.String scriptName)
Execute for the entity a script with a given script name and the default function "main".
c.getSubject().executeScript("example_script.js");
Parameters: scriptName - The name of the script to execute.
executeScript
void executeScript(java.lang.String scriptName,
java.lang.String function)
Execute for the entity a script with a given script name.
c.getSubject().executeScript("example_script.js", "custom_function");
Parameters: function - The name of the function within the script to execute.
executeScript
void executeScript(java.lang.String scriptName,