public class ScriptableWorld
extends net.minecraft.src.customstuff2.engine.ScriptObject
| Constructor and Description |
|---|
ScriptableWorld(net.minecraft.src.World world,
net.minecraft.src.customstuff2.engine.Mod mod,
org.mozilla.javascript.ScriptableObject scope) |
| Modifier and Type | Method and Description |
|---|---|
int |
addToContainer(int x,
int y,
int z,
int id,
int count,
int metadata)
Adds items to a container if there's space for them.
|
int |
addToContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int count,
int metadata)
Adds items to a container if there's space for them.
|
int |
addToContainerSlot(int x,
int y,
int z,
int slotId,
int count)
Adds items to a container slot if it isn't empty
|
int |
addToContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
Adds items to a container slot if it isn't empty
|
void |
clearContainer(int x,
int y,
int z)
Clears a container
|
void |
clearContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Clears a container
|
void |
clearContainerSlot(int x,
int y,
int z,
int slotId)
Clears a container slot
|
void |
clearContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
Clears a container slot
|
int |
countEntities(int x,
int y,
int z,
float radius,
java.lang.String entities)
Gets the amount of entities within the given cube with the given radius.
|
int |
countEntities(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
float radius,
java.lang.String entities)
Gets the amount of entities within the given cube with the given radius.
|
void |
createExplosion(double x,
double y,
double z,
float strength,
boolean flaming)
Creates a explosion
|
void |
createExplosion(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
float strength,
boolean flaming)
Creates a explosion
|
void |
createThunderbolt(double x,
double y,
double z)
Creates a thunderbolt
|
void |
createThunderbolt(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Creates a thunderbolt
|
void |
damageItem(int x,
int y,
int z,
int slotId,
int count)
Damages an item in a container slot
|
void |
damageItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
Damages an item in a container slot
|
int |
fillContainer(int x,
int y,
int z,
int id,
int metadata)
Fills a container.
|
int |
fillContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int metadata)
Fills a container.
|
int |
fillContainerSlot(int x,
int y,
int z,
int slotId)
Fills a container slot if it isn't empty
|
int |
fillContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
Fills a container slot if it isn't empty
|
java.lang.String |
getBiome(int x,
int y,
int z)
Gets the biome
|
java.lang.String |
getBiome(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Gets the biome
|
int |
getBlockId(int x,
int y,
int z)
Gets the block id
|
int |
getBlockId(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Gets the block id
|
int |
getBlockMetadata(int x,
int y,
int z)
Gets the block's damage value
|
int |
getBlockMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Gets the block's damage value
|
int |
getContainerItemCount(int x,
int y,
int z,
int id,
int metadata)
Gets the count of a item in a container
|
int |
getContainerItemCount(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int metadata)
Gets the count of a item in a container
|
int |
getContainerSlotId(int x,
int y,
int z,
int slotId)
Gets the item's id in a slot of a container
|
int |
getContainerSlotId(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
Gets the item's id in a slot of a container
|
int |
getContainerSlotMetadata(int x,
int y,
int z,
int slotId)
Gets the item's damage value in a slot of a container
|
int |
getContainerSlotMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
Gets the item's damage value in a slot of a container
|
int |
getContainerSlotStackSize(int x,
int y,
int z,
int slotId)
Gets the item's stack size in a slot of a container
|
int |
getContainerSlotStackSize(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
Gets the item's stack size in a slot of a container
|
int |
getTileEntityIntData(int x,
int y,
int z,
int index)
Gets a tile entity's integer data
|
int |
getTileEntityIntData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index)
Gets a tile entity's integer data
|
java.lang.String |
getTileEntityStringData(int x,
int y,
int z,
int index)
Gets a tile entity's string data
|
java.lang.String |
getTileEntityStringData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index)
Gets a tile entity's string data
|
long |
getTime()
Gets the world time
|
void |
harvestBlock(int x,
int y,
int z)
Harvests a block
|
void |
harvestBlock(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Harvests a block
|
boolean |
isFuelInContainerSlot(int x,
int y,
int z,
int slot) |
boolean |
isFuelInContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slot) |
int |
removeFromContainer(int x,
int y,
int z,
int id,
int count,
int metadata)
Removes items from a container
|
int |
removeFromContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int count,
int metadata)
Removes items from a container
|
int |
removeFromContainerSlot(int x,
int y,
int z,
int slotId,
int count)
Removes items from a container slot
|
int |
removeFromContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
Removes items from a container slot
|
void |
repairItem(int x,
int y,
int z,
int slotId)
Fully repairs an item in a container slot
|
void |
repairItem(int x,
int y,
int z,
int slotId,
int count) |
void |
repairItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
Fully repairs an item in a container slot
|
void |
repairItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
Repairs an item in a container slot
|
void |
setBlockId(int x,
int y,
int z,
int id)
Sets the id of the block at the given coordinates
|
void |
setBlockId(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id)
Sets the id of the block at the given position
|
void |
setBlockIdAndMetadata(int x,
int y,
int z,
int id,
int metadata)
Sets the id and damage value of a block
|
void |
setBlockIdAndMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int metadata)
Sets the id and damage value of a block
|
void |
setBlockMetadata(int x,
int y,
int z,
int metadata)
Sets the damage value of a block
|
void |
setBlockMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int metadata)
Sets the damage value of a block
|
int |
setContainerSlot(int x,
int y,
int z,
int slotId,
int id,
int count,
int metadata)
Sets a container slot
|
int |
setContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int id,
int count,
int metadata)
Sets a container slot
|
void |
setTileEntityIntData(int x,
int y,
int z,
int index,
int data)
Sets a tile entity's integer data.
|
void |
setTileEntityIntData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index,
int data)
Sets a tile entity's integer data.
|
void |
setTileEntityStringData(int x,
int y,
int z,
int index,
java.lang.String data)
Sets a tile entity's string data.
|
void |
setTileEntityStringData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index,
java.lang.String data)
Sets a tile entity's string data.
|
void |
setTime(long time)
Sets the time
|
void |
setWeather(java.lang.String weather,
int duration)
Sets the weather
|
void |
shear(int x,
int y,
int z)
Shears a block if it can be sheared.
|
void |
shear(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
Shears a block if it can be sheared.
|
void |
spawnItem(double x,
double y,
double z,
int id,
int count,
int damage)
Spawns an item
|
void |
spawnItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int count,
int damage)
Spawns an item
|
void |
spawnMob(double x,
double y,
double z,
java.lang.String name)
Spawns a mob
|
void |
spawnMob(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
java.lang.String name)
Spawns a mob
|
public ScriptableWorld(net.minecraft.src.World world,
net.minecraft.src.customstuff2.engine.Mod mod,
org.mozilla.javascript.ScriptableObject scope)
public void setBlockId(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id)
position - The positionid - The id of the blockpublic void setBlockId(int x,
int y,
int z,
int id)
x - The x coordinatey - The y coordinatez - The z coordinateid - The id of the blockpublic void setBlockMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int metadata)
position - The positionmetadata - The damage value of the blockpublic void setBlockMetadata(int x,
int y,
int z,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinatemetadata - The damage value of the blockpublic void setBlockIdAndMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int metadata)
position - The positionid - The block's idmetadata - The block's damage valuepublic void setBlockIdAndMetadata(int x,
int y,
int z,
int id,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinateid - The block's idmetadata - The block's damage valuepublic void harvestBlock(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic void harvestBlock(int x,
int y,
int z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic void setTime(long time)
time - The timepublic long getTime()
public void createExplosion(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
float strength,
boolean flaming)
position - The positionstrength - The strength of the explosionflaming - True if the explosion is a flaming explosionpublic void createExplosion(double x,
double y,
double z,
float strength,
boolean flaming)
x - The x coordinatey - The y coordinatez - The z coordinatestrength - The strength of the explosionflaming - True if the explosion is a flaming explosionpublic void createThunderbolt(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic void createThunderbolt(double x,
double y,
double z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic void spawnMob(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
java.lang.String name)
position - The positionname - The name of the mobpublic void spawnMob(double x,
double y,
double z,
java.lang.String name)
x - The x coordinatey - The y coordinatez - The z coordinatename - The name of the mobpublic void spawnItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int count,
int damage)
position - The positionid - The item's idcount - The item's stack sizedamage - The item's damage valuepublic void spawnItem(double x,
double y,
double z,
int id,
int count,
int damage)
x - The x coordinatey - The y coordinatez - The z coordinateid - The item's idcount - The item's stack sizedamage - The item's damage valuepublic void setWeather(java.lang.String weather,
int duration)
weather - sun, rain or thunderingduration - The durationpublic int fillContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int metadata)
position - The positionid - The item's idmetadata - The item's damage valuepublic int fillContainer(int x,
int y,
int z,
int id,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinateid - The item's idmetadata - The item's damage valuepublic void clearContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic void clearContainer(int x,
int y,
int z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic int addToContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int count,
int metadata)
position - The positionid - The item's idcount - The item's stack sizemetadata - The item's damage valuepublic int addToContainer(int x,
int y,
int z,
int id,
int count,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinateid - The item's idcount - The item's stack sizemetadata - The item's damage valuepublic int removeFromContainer(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int count,
int metadata)
position - The positionid - The item's idcount - The item's stack sizemetadata - The item's damage valuepublic int removeFromContainer(int x,
int y,
int z,
int id,
int count,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinateid - The item's idcount - The item's stack sizemetadata - The item's damage valuepublic void clearContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
position - The positionslotId - The slot's idpublic void clearContainerSlot(int x,
int y,
int z,
int slotId)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idpublic int fillContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
position - The positionslotId - The slot's idpublic int fillContainerSlot(int x,
int y,
int z,
int slotId)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idpublic int setContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int id,
int count,
int metadata)
position - The positionslotId - The slot's idid - The item's idcount - The item's stack sizemetadata - The item's damage valuepublic int setContainerSlot(int x,
int y,
int z,
int slotId,
int id,
int count,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idid - The item's idcount - The item's stack sizemetadata - The item's damage valuepublic int removeFromContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
position - The positionslotId - The slot's idcount - The count of items to removepublic int removeFromContainerSlot(int x,
int y,
int z,
int slotId,
int count)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idcount - The count of items to removepublic int addToContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
position - The positionslotId - The slot's idcount - The count to addpublic int addToContainerSlot(int x,
int y,
int z,
int slotId,
int count)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idcount - The count to addpublic void damageItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
position - The positionslotId - The slot's idcount - The damage to add to the itempublic void damageItem(int x,
int y,
int z,
int slotId,
int count)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idcount - The damage to add to the itempublic void repairItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
position - The positionslotId - The slot's idpublic void repairItem(int x,
int y,
int z,
int slotId)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idpublic void repairItem(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId,
int count)
position - The positionslotId - The slot's idcount - The damage to remove from the itempublic void repairItem(int x,
int y,
int z,
int slotId,
int count)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idcount - The damage to remove from the itempublic int getBlockId(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic int getBlockId(int x,
int y,
int z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic int getBlockMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic int getBlockMetadata(int x,
int y,
int z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic int getContainerSlotId(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
position - The positionslotId - The slot's idpublic int getContainerSlotId(int x,
int y,
int z,
int slotId)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - public int getContainerSlotMetadata(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
position - The positionslotId - The slot's idpublic int getContainerSlotMetadata(int x,
int y,
int z,
int slotId)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - The slot's idpublic int getContainerSlotStackSize(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slotId)
position - The positionslotId - The slot's idpublic int getContainerSlotStackSize(int x,
int y,
int z,
int slotId)
x - The x coordinatey - The y coordinatez - The z coordinateslotId - slotId The slot's idpublic int getContainerItemCount(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int id,
int metadata)
position - The positionid - The item's idmetadata - The item's damage valuepublic int getContainerItemCount(int x,
int y,
int z,
int id,
int metadata)
x - The x coordinatey - The y coordinatez - The z coordinateid - The item's idmetadata - The item's damage valuepublic boolean isFuelInContainerSlot(net.minecraft.src.customstuff2.scripting.ScriptablePosition position,
int slot)
position - The positionslot - The slot's idpublic boolean isFuelInContainerSlot(int x,
int y,
int z,
int slot)
x - The x coordinatey - The y coordinatez - The z coordinateslot - The slot's idpublic java.lang.String getBiome(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic java.lang.String getBiome(int x,
int y,
int z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic void shear(net.minecraft.src.customstuff2.scripting.ScriptablePosition position)
position - The positionpublic void shear(int x,
int y,
int z)
x - The x coordinatey - The y coordinatez - The z coordinatepublic int getTileEntityIntData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index)
pos - positionindex - The index to read the data from (0 to 15)public int getTileEntityIntData(int x,
int y,
int z,
int index)
x - The x-coordinatey - The y-coordinatez - The z-coordinateindex - The index to read the data from (0 to 15)public java.lang.String getTileEntityStringData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index)
pos - positionindex - The index to read the data from (0 to 15)public java.lang.String getTileEntityStringData(int x,
int y,
int z,
int index)
x - The x-coordinatey - The y-coordinatez - The z-coordinateindex - The index to read the data from (0 to 15)public void setTileEntityIntData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index,
int data)
pos - positionindex - The index of the data (0 to 15)data - The data to set at the indexpublic void setTileEntityIntData(int x,
int y,
int z,
int index,
int data)
x - The x-coordinatey - The y-coordinatez - The z-coordinateindex - The index of the data (0 to 15)data - The data to set at the indexpublic void setTileEntityStringData(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
int index,
java.lang.String data)
pos - positionindex - The index of the data (0 to 15)data - The data to set at the indexpublic void setTileEntityStringData(int x,
int y,
int z,
int index,
java.lang.String data)
x - The x-coordinatey - The y-coordinatez - The z-coordinateindex - The index of the data (0 to 15)data - The data to set at the indexpublic int countEntities(net.minecraft.src.customstuff2.scripting.ScriptablePosition pos,
float radius,
java.lang.String entities)
pos - The positionradius - The radius of the lookup cubeentities - The entities to search. Allowed values are 'hostile',
'animal', 'mob', 'player', 'item', 'all', any entityID and any
entity name. You can give multiple values by dividing them with a ','public int countEntities(int x,
int y,
int z,
float radius,
java.lang.String entities)
x - The x-coordinatey - The y-coordinatez - The z-coordinateradius - The radius of the lookup cubeentities - The entities to search. Allowed values are 'hostile',
'animal', 'mob', 'player', 'item', 'all', any entityID and any
entity name. You can give multiple values by dividing them with a ','