public class ScriptableMod
extends net.minecraft.src.customstuff2.engine.ScriptMod
| Constructor and Description |
|---|
ScriptableMod(net.minecraft.src.customstuff2.engine.CustomStuffEngine engine,
net.minecraft.src.customstuff2.engine.Mod mod,
org.mozilla.javascript.Context context,
org.mozilla.javascript.ScriptableObject scope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlias(int id,
java.lang.String alias)
Adds a alias for an item with metadata -1, which will allow all metadata
items in a recipe
|
void |
addAliasWithMetadata(int id,
int dv,
java.lang.String alias)
Adds a alias for an item
|
void |
addBlock(java.lang.String blockFile,
java.lang.String blockType)
Adds a block with the given type to the game
|
void |
addDungeonLoot(int id,
int dv,
float rarity)
Adds a item stack to the dungeon loot list with a stack size of 1.
|
void |
addDungeonLoot(int id,
int dv,
int minCount,
int maxCount,
float rarity)
Adds a item stack, with a range of sizes, to the dungeon loot list.
|
void |
addDungeonMob(java.lang.String name,
float rarity)
Adds a mob to the possible list of creatures the spawner will create.
|
void |
addFuel(java.lang.String item,
int duration)
Adds a fuel to the vanilla fuel list
|
void |
addFuelFor(java.lang.String fuelLists,
java.lang.String item,
int duration)
Adds a fuel to the given fuel lists
|
void |
addGrassPlant(int id,
int dv,
int prob)
Register a new plant to be planted when bonemeal is used on grass.
|
void |
addGrassSeed(int id,
int dv,
int quantity,
int prob)
Register a new seed to be dropped when breaking tall grass.
|
void |
addGui(java.lang.String guiFile,
java.lang.String guiType)
Adds a GUI with the given type to the game
|
void |
addItem(java.lang.String itemFile,
java.lang.String itemType)
Adds an item with the given type to the game
|
void |
addRecipe(java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
Adds a crafting recipe to the vanilla recipe list.
|
void |
addRecipeFor(java.lang.String recipeLists,
java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
Adds a crafting recipe to the given recipeLists.
|
void |
addShapelessRecipe(java.lang.String result,
java.lang.String... recipeItems)
Adds a shapeless crafting recipe to the vanilla recipe list.
|
void |
addShapelessRecipeFor(java.lang.String recipeLists,
java.lang.String result,
java.lang.String... recipeItems)
Adds a shapeless crafting recipe to the given recipe lists.
|
void |
addSmeltingRecipe(java.lang.String result,
java.lang.String input)
Adds a smelting recipe to the vanilla recipe list
|
void |
addSmeltingRecipeFor(java.lang.String recipeLists,
java.lang.String result,
java.lang.String input)
Adds a smelting recipe to the given recipe lists
|
void |
addSpawn(java.lang.String name,
int rate,
int min,
int max,
java.lang.String type)
Adds a mob to the spawn list for all biomes except hell
|
void |
addSpawn(java.lang.String name,
int rate,
int min,
int max,
java.lang.String type,
java.lang.String... biome)
Adds a mob to the spawn list for selected biomes
|
void |
addTileEntity(java.lang.String tileEntityFile,
java.lang.String tileEntityType)
Adds a tile entity with the given type to the game
|
void |
addToOreDictionary(java.lang.String oreClass,
int id,
int dv)
Adds an item to the ore dictionary
|
void |
loadScript(java.lang.String file)
Executes a script from a file
|
void |
printLine(java.lang.String s)
Prints a line in the console.
|
void |
registerBonemealHandler(java.lang.String file)
Registers a file for a bonemeal handler.
|
void |
registerCraftingHandler(java.lang.String file)
Registers a file for a crafting handler.
|
void |
registerDestroyItemHandler(java.lang.String file)
Registers a file for a destroyitem handler.
|
void |
registerPickupHandler(java.lang.String file)
Registers a file for a pickup handler.
|
void |
removeAllBiomesExcept(java.lang.String biome)
Removes all biomes except the selected one
|
void |
removeBiome(java.lang.String biome)
Remove a biome from the terrain generator
|
void |
removeDungeonLoot(int id,
int dv)
Removes a item stack from the dungeon loot list, this will remove all
items as long as the item stack matches, it will not care about matching
the stack size ranges perfectly.
|
void |
removeDungeonLoot(int id,
int dv,
int minCount,
int maxCount)
Removes a item stack from the dungeon loot list.
|
void |
removeDungeonMob(java.lang.String name)
Will completely remove a Mob from the dungeon spawn list.
|
void |
removeRecipe(java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
Removes a crafting recipe from the vanilla recipe list.
|
void |
removeRecipeFrom(java.lang.String recipeLists,
java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
Removes a crafting recipe from the given recipe lists.
|
void |
removeShapelessRecipe(java.lang.String result,
java.lang.String... recipeItems)
Removes a shapeless crafting recipe from the vanilla recipe list
|
void |
removeShapelessRecipeFrom(java.lang.String recipeLists,
java.lang.String result,
java.lang.String... recipeItems)
Removes a shapeless crafting recipe from the given recipe lists.
|
void |
removeSpawn(java.lang.String name,
java.lang.String type)
Remove a mob from the spawn list for all biomes except hell
|
void |
removeSpawn(java.lang.String name,
java.lang.String type,
java.lang.String... biome)
Remove a mob from spawn list for selected biomes.
|
public ScriptableMod(net.minecraft.src.customstuff2.engine.CustomStuffEngine engine,
net.minecraft.src.customstuff2.engine.Mod mod,
org.mozilla.javascript.Context context,
org.mozilla.javascript.ScriptableObject scope)
public void printLine(java.lang.String s)
s - public void loadScript(java.lang.String file)
file - The name of the file (for example aFile.js)public void addAlias(int id,
java.lang.String alias)
id - The item's idalias - The alias for the itempublic void addAliasWithMetadata(int id,
int dv,
java.lang.String alias)
id - The item's iddv - The item's damage valuealias - The alias for the itempublic void registerCraftingHandler(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.IOException
file - The file to registerjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void registerPickupHandler(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.IOException
file - The file to registerjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void registerBonemealHandler(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.IOException
file - The file to registerjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void registerDestroyItemHandler(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.IOException
file - The file to registerjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic void addRecipe(java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
throws java.lang.Exception
result - The result itemwidth - The recipe's widthheight - The recipe's heightrecipeItems - The recipe itemsjava.lang.Exceptionpublic void addRecipeFor(java.lang.String recipeLists,
java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
throws java.lang.Exception
recipeLists - The recipe lists in which the recipe is added. For
example 'vanilla,myOwn' or 'myOwn'result - The result itemwidth - The recipe's widthheight - The recipe's heightrecipeItems - The recipe itemsjava.lang.Exceptionpublic void addShapelessRecipe(java.lang.String result,
java.lang.String... recipeItems)
throws java.lang.Exception
result - The result itemrecipeItems - The recipe itemsjava.lang.Exceptionpublic void addShapelessRecipeFor(java.lang.String recipeLists,
java.lang.String result,
java.lang.String... recipeItems)
throws java.lang.Exception
recipeLists - The recipe lists in which the recipe is added. For
example 'vanilla,myOwn' or 'myOwn'result - The result itemrecipeItems - The recipe itemsjava.lang.Exceptionpublic void removeRecipe(java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
throws java.lang.Exception
result - The result itemwidth - The recipe's widthheight - The recipe's heightrecipeItems - The recipe itemsjava.lang.Exceptionpublic void removeRecipeFrom(java.lang.String recipeLists,
java.lang.String result,
int width,
int height,
java.lang.String... recipeItems)
throws java.lang.Exception
recipeLists - The recipe lists to remove the recipe from. For example
'vanilla,myOwn' or 'myOwn'result - The result itemwidth - The recipe's widthheight - The recipe's heightrecipeItems - The recipe itemsjava.lang.Exceptionpublic void removeShapelessRecipe(java.lang.String result,
java.lang.String... recipeItems)
throws java.lang.Exception
result - The result itemrecipeItems - The recipe itemsjava.lang.Exceptionpublic void removeShapelessRecipeFrom(java.lang.String recipeLists,
java.lang.String result,
java.lang.String... recipeItems)
throws java.lang.Exception
recipeLists - The recipe lists to remove the recipe from.result - The result itemrecipeItems - The recipe itemsjava.lang.Exceptionpublic void addSmeltingRecipe(java.lang.String result,
java.lang.String input)
throws java.lang.Exception
result - The result iteminput - The input itemjava.lang.Exceptionpublic void addSmeltingRecipeFor(java.lang.String recipeLists,
java.lang.String result,
java.lang.String input)
throws java.lang.Exception
recipeLists - The list to add the recipe for.result - The result iteminput - The input itemjava.lang.Exceptionpublic void addFuel(java.lang.String item,
int duration)
throws java.lang.Exception
item - The itemduration - The durationjava.lang.Exceptionpublic void addFuelFor(java.lang.String fuelLists,
java.lang.String item,
int duration)
throws java.lang.Exception
fuelLists - The fuel lists to add the fuel for.item - The itemduration - The durationjava.lang.Exceptionpublic void addSpawn(java.lang.String name,
int rate,
int min,
int max,
java.lang.String type)
throws java.lang.Exception
name - The name of the mobrate - The rate (higher rate -> mob is more common)min - The minimum count of the mob for one spawnmax - The maximum count of the mob for one spawntype - The type of the spawn (monster, creature or water)java.lang.Exceptionpublic void addSpawn(java.lang.String name,
int rate,
int min,
int max,
java.lang.String type,
java.lang.String... biome)
throws java.lang.Exception
name - The name of the mobrate - The rate (higher rate -> mob is more common)min - The minimum count of the mob for one spawnmax - The maximum count of the mob for one spawntype - The type of the spawn (monster, creature or water)biome - The biomes where the mob is spawnedjava.lang.Exceptionpublic void removeSpawn(java.lang.String name,
java.lang.String type)
throws java.lang.Exception
name - The name of the mobtype - The type of the spawn (monster, creature or water)java.lang.Exceptionpublic void removeSpawn(java.lang.String name,
java.lang.String type,
java.lang.String... biome)
throws java.lang.Exception
name - The name of the mobtype - The type of the spawn (monster, creature or water)biome - The biomes to remove the mob from.java.lang.Exceptionpublic void removeBiome(java.lang.String biome)
throws java.lang.Exception
biome - The biome to removejava.lang.Exceptionpublic void removeAllBiomesExcept(java.lang.String biome)
throws java.lang.Exception
biome - The biome to removejava.lang.Exceptionpublic void addToOreDictionary(java.lang.String oreClass,
int id,
int dv)
throws java.lang.Exception
oreClass - The ore classid - The item's iddv - The item'S damage valuejava.lang.Exceptionpublic void addGrassPlant(int id,
int dv,
int prob)
throws java.lang.Exception
id - The block's iddv - The block's damage valueprob - The relative probability of the plant, where red flowers are
10 and yellow flowers are 20.java.lang.Exceptionpublic void addGrassSeed(int id,
int dv,
int quantity,
int prob)
throws java.lang.Exception
id - The item's iddv - The item's damage valuequantity - The quantity of seeds to drop.prob - The relative probability of the seeds, where wheat seeds are
10.java.lang.Exceptionpublic void addDungeonMob(java.lang.String name,
float rarity)
throws java.lang.Exception
name - The name of the mobrarity - The rarity of selecting this mob over others. Must be
greater then 0. Vanilla Minecraft has the following mobs:
Spider 1
Skeleton 1
Zombie 2
Meaning, Zombies are twice as common as spiders or skeletons.java.lang.Exceptionpublic void removeDungeonMob(java.lang.String name)
throws java.lang.Exception
name - The name of the mobjava.lang.Exceptionpublic void addDungeonLoot(int id,
int dv,
float rarity)
throws java.lang.Exception
id - The item's iddv - The item's damage valuerarity - The relative chance that this item will spawn, Vanilla has
most of its items set to 1. Like the saddle, bread, silk, wheat,
etc.. Rarer items are set to lower values, EXA: Golden Apple 0.01java.lang.Exceptionpublic void addDungeonLoot(int id,
int dv,
int minCount,
int maxCount,
float rarity)
throws java.lang.Exception
id - The item's iddv - The item's damage valueminCount - When this item does generate, the minimum number that is
in the stackmaxCount - When this item does generate, the maximum number that can
bein the stackrarity - The relative chance that this item will spawn, Vanilla has
most of its items set to 1. Like the saddle, bread, silk, wheat,
etc.. Rarer items are set to lower values, EXA: Golden Apple 0.01java.lang.Exceptionpublic void removeDungeonLoot(int id,
int dv)
throws java.lang.Exception
id - The item's iddv - The item's damage valuejava.lang.Exceptionpublic void removeDungeonLoot(int id,
int dv,
int minCount,
int maxCount)
throws java.lang.Exception
id - The item's iddv - The item's damage valueminCount - The minimum count for the match check, if less then 0, the
size check is skippedmaxCount - The max count used in match check when 'minCount' is >= 0java.lang.Exceptionpublic void addItem(java.lang.String itemFile,
java.lang.String itemType)
throws java.lang.Exception
itemFile - The item's fileitemType - The item's typejava.lang.Exceptionpublic void addBlock(java.lang.String blockFile,
java.lang.String blockType)
throws java.lang.Exception
blockFile - The block's fileblockType - The block's typejava.lang.Exceptionpublic void addTileEntity(java.lang.String tileEntityFile,
java.lang.String tileEntityType)
throws java.lang.Exception
tileEntityFile - The tileentity's filetileEntityType - The tileentity's typejava.lang.Exceptionpublic void addGui(java.lang.String guiFile,
java.lang.String guiType)
throws java.lang.Exception
guiFile - The GUI's fileguiType - The GUI's typejava.lang.Exception