public class ScriptableMod
extends java.lang.Object
Constructor and Description |
---|
ScriptableMod(cubex2.cs2core.Mod mod,
org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable scope) |
Modifier and Type | Method and Description |
---|---|
void |
addAlias(int id,
java.lang.String alias)
Adds an alias for an item with metadata 32767, which will allow all metadata items in a recipe
|
void |
addAliasWithMetadata(int id,
int dv,
java.lang.String alias)
Adds an alias for an item
|
void |
addAssemblyRecipe(int energy,
java.lang.String result,
java.lang.String... input)
Add a recipe to the BuildCraft assembly table
|
void |
addBlastFurnaceRecipe(java.lang.String input,
java.lang.String output,
int cookTime)
Add a recipe to the Railcraft blast furnace
|
void |
addBlock(java.lang.String blockFile,
java.lang.String blockType)
Adds a block with the given type to the game
|
void |
addChestItem(java.lang.String chest,
int id,
int dv,
int rarity)
Adds an item to a generated chest with a stack size of 1
|
void |
addChestItem(java.lang.String chest,
int id,
int dv,
int minCount,
int maxCount,
int rarity)
Adds an item to a generated chest.
|
void |
addCokeOvenRecipe(java.lang.String input,
java.lang.String outputItem,
java.lang.String outputLiquid,
int cookTime)
Add a recipe to the Railcraft coke oven
|
void |
addCreativeTab(java.lang.String name,
int id,
int meta)
Adds a creative tab.
|
void |
addCrucibleRecipe(int energy,
java.lang.String input,
java.lang.String output)
Add a recipe to the Thermal Expansion Crucible.
|
void |
addDungeonLoot(int id,
int dv,
int 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,
int rarity)
Adds a item stack, with a range of sizes, to the dungeon loot list.
|
void |
addDungeonMob(java.lang.String name,
int 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 |
addInductionSmelterRecipe(int energy,
java.lang.String primaryInput,
java.lang.String secondaryInput,
java.lang.String primaryOutput)
Add a recipe to the Thermal Expansion Induction Smelter.
|
void |
addInductionSmelterRecipe(int energy,
java.lang.String primaryInput,
java.lang.String secondaryInput,
java.lang.String primaryOutput,
java.lang.String secondaryOutput)
Add a recipe to the Thermal Expansion Induction Smelter.
|
void |
addInductionSmelterRecipe(int energy,
java.lang.String primaryInput,
java.lang.String secondaryInput,
java.lang.String primaryOutput,
java.lang.String secondaryOutput,
int secondaryChance)
Add a recipe to the Thermal Expansion Induction Smelter.
|
void |
addItem(java.lang.String itemFile,
java.lang.String itemType)
Adds an item with the given type to the game
|
void |
addLiquidTransposerExtractionRecipe(int energy,
java.lang.String input,
java.lang.String output,
java.lang.String liquid,
int chance,
boolean reversible)
Add a recipe to the Thermal Expansion Liquid Transposer
|
void |
addLiquidTransposerFillRecipe(int energy,
java.lang.String input,
java.lang.String output,
java.lang.String liquid,
boolean reversible)
Add a recipe to the Thermal Expansion Liquid Transposer
|
void |
addMobDrop(java.lang.String mob,
int id,
int meta,
int amount)
Adds an item to a mob's drops
|
void |
addMobDrop(java.lang.String mob,
int id,
int meta,
int amount,
float rate)
Adds an item to a mob's drops
|
void |
addPoweredFurnaceRecipe(int energy,
java.lang.String input,
java.lang.String output)
Add a recipe to the Thermal Expansion Powered Furnace.
|
void |
addPulverizerRecipe(int energy,
java.lang.String input,
java.lang.String primaryOutput)
Add a recipe to the Thermal Expansion Pulverizer
|
void |
addPulverizerRecipe(int energy,
java.lang.String input,
java.lang.String primaryOutput,
java.lang.String secondaryOutput)
Add a recipe to the Thermal Expansion Pulverizer
|
void |
addPulverizerRecipe(int energy,
java.lang.String input,
java.lang.String primaryOutput,
java.lang.String secondaryOutput,
int secondaryChance)
Add a recipe to the Thermal Expansion Pulverizer
|
void |
addRareMobDrop(java.lang.String mob,
int id,
int meta,
int amount)
Adds an item to a mob's rare drops.
|
void |
addRareMobDrop(java.lang.String mob,
int id,
int meta,
int amount,
float rate)
Adds an item to a mob's rare drops.
|
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 |
addRefineryRecipe(java.lang.String ingredient1,
java.lang.String ingredient2,
java.lang.String result,
int energy,
int delay)
Add a recipe to the BuildCraft Refinery
|
void |
addRockCrusherRecipe(java.lang.String input,
java.lang.String... output)
Add a recipe to the Railcraft rock crusher
|
void |
addSawmillRecipe(int energy,
java.lang.String input,
java.lang.String primaryOutput)
Add a recipe to the Thermal Expansion Sawmill
|
void |
addSawmillRecipe(int energy,
java.lang.String input,
java.lang.String primaryOutput,
java.lang.String secondaryOutput)
Add a recipe to the Thermal Expansion Sawmill
|
void |
addSawmillRecipe(int energy,
java.lang.String input,
java.lang.String primaryOutput,
java.lang.String secondaryOutput,
int secondaryChance)
Add a recipe to the Thermal Expansion Sawmill
|
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 |
addTradeRecipe(int profession,
java.lang.String itemToBuy,
java.lang.String itemToSell,
float chance)
Adds a trade recipe for villagers
|
void |
addTradeRecipe(int profession,
java.lang.String itemToBuy,
java.lang.String secondItemToBuy,
java.lang.String itemToSell,
float chance)
Adds a trade recipe for villagers
|
void |
addWorldGen(java.lang.String worldGenFile,
java.lang.String worldGenType)
Adds a world generator with the given type to the game
|
void |
appendFile(java.lang.String file,
java.lang.String content)
Appends a string to a file.
|
void |
disableAirRendering()
Disables rendering of the air bar
|
void |
disableArmorRendering()
Disables rendering of the player's armor bar
|
void |
disableBossHealthRendering()
Disables rendering of the boss health
|
void |
disableCrosshairsRendering()
Disables rendering of the crosshairs
|
void |
disableExperienceRendering()
Disables rendering of the experience bar
|
void |
disableFoodRendering()
Disables rendering of the food bar
|
void |
disableHealthRendering()
Disables rendering of the player's health
|
void |
disableHelmetRendering()
Disables rendering of helmet overlay (i.e. the pumpkin overlay)
|
void |
disableHotbarRendering()
Disables rendering of the hotbar
|
void |
disableObjectiveRendering()
Disables rendering of the objective
|
void |
disablePortalRendering()
Disables rendering of the portal overlay
|
void |
enableAirRendering()
Enables rendering of the air bar
|
void |
enableArmorRendering()
Enables rendering of the player's armor bar
|
void |
enableBossHealthRendering()
Enables rendering of the boss health
|
void |
enableCrosshairsRendering()
Enables rendering of the crosshairs
|
void |
enableExperienceRendering()
Enables rendering of the experience bar
|
void |
enableFoodRendering()
Enables rendering of the food bar
|
void |
enableHealthRendering()
Enables rendering of the player's health
|
void |
enableHelmetRendering()
Enables rendering of helmet overlay (i.e. the pumpkin overlay)
|
void |
enableHotbarRendering()
Enables rendering of the hotbar
|
void |
enableObjectiveRendering()
Enables rendering of the objective
|
void |
enablePortalRendering()
Enables rendering of the portal overlay
|
java.lang.String |
getBlockType(int id)
Gets the type of the block with the given id.
|
java.lang.String |
getModName()
Gets the mod's name.
|
java.lang.String[] |
getOreDictClasses()
Gets all registered ore dictionary classes.
|
java.lang.String[] |
getOreDictClassItems(java.lang.String clazz)
Gets all items in a ore dictionary class.
|
boolean |
isItemInOreDictClass(int id,
int meta,
java.lang.String clazz)
Checks if the given item is registered for the given ore dictionary class.
|
void |
loadScript(java.lang.String file)
Executes a script from a file
|
void |
printLine(java.lang.String s)
Prints a line in the console.
|
java.lang.String |
readFile(java.lang.String file)
Reads the content of a file.
|
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 |
registerIngameRenderer(java.lang.String file)
Registers a file for the ingame renderer.
|
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 |
removeAllRecipes()
Removes all recipes that can be used in the vanilla crafting table.
|
void |
removeBiome(java.lang.String biome)
Remove a biome from the terrain generator
|
void |
removeBiomeDecoration(java.lang.String name)
Removes a vanilla biome decorator.
|
void |
removeChestItem(java.lang.String chest,
int id,
int dv)
Removes and item from the list of items in a generated chest.
|
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 |
removeMinable(java.lang.String name)
Removes a vanilla minable world generator.
|
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 |
removeRecipesByResult(java.lang.String result)
Removes all recipes that have the given result and can be used in the vanilla crafting table.
|
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 |
removeSmeltingRecipe(java.lang.String input)
Removes a smelting recipe from the vanilla recipe list
|
void |
removeSmeltingRecipeFrom(java.lang.String recipeLists,
java.lang.String input)
Removes a smelting 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.
|
void |
removeTradeRecipe(int profession,
java.lang.String itemToBuy,
java.lang.String itemToSell)
Removes a trade recipe from villagers
|
void |
removeTradeRecipe(int profession,
java.lang.String itemToBuy,
java.lang.String secondItemToBuy,
java.lang.String itemToSell)
Removes a trade recipe from villagers
|
void |
writeFile(java.lang.String file,
java.lang.String content)
Writes a string to a file.
|
public ScriptableMod(cubex2.cs2core.Mod mod, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope)
public void printLine(java.lang.String s)
s
- The text to displaypublic void loadScript(java.lang.String file) throws java.lang.Exception
file
- The name of the file (for example aFile.js)java.lang.Exception
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.lang.Exception
file
- The path to the script file relative to the mod's scripts directory.java.lang.Exception
public void registerPickupHandler(java.lang.String file) throws java.lang.Exception
file
- The path to the script file relative to the mod's scripts directory.java.lang.Exception
public void registerBonemealHandler(java.lang.String file) throws java.lang.Exception
file
- The path to the script file relative to the mod's scripts directory.java.lang.Exception
public void registerDestroyItemHandler(java.lang.String file) throws java.lang.Exception
file
- The path to the script file relative to the mod's scripts directory.java.lang.Exception
public void registerIngameRenderer(java.lang.String file) throws java.lang.Exception
file
- The path to the script file relative to the mod's scripts directory.java.lang.Exception
public 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.Exception
public 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.Exception
public void addShapelessRecipe(java.lang.String result, java.lang.String... recipeItems) throws java.lang.Exception
result
- The result itemrecipeItems
- The recipe itemsjava.lang.Exception
public 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.Exception
public void removeAllRecipes()
public void removeRecipesByResult(java.lang.String result)
result
- The result itempublic 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.Exception
public 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.Exception
public void removeShapelessRecipe(java.lang.String result, java.lang.String... recipeItems) throws java.lang.Exception
result
- The result itemrecipeItems
- The recipe itemsjava.lang.Exception
public 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.Exception
public void addSmeltingRecipe(java.lang.String result, java.lang.String input) throws java.lang.Exception
result
- The result iteminput
- The input itemjava.lang.Exception
public 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.Exception
public void removeSmeltingRecipe(java.lang.String input)
input
- The input of the smelting recipepublic void removeSmeltingRecipeFrom(java.lang.String recipeLists, java.lang.String input)
recipeLists
- The recipe lists separated with ','input
- The input of the smelting recipepublic void addTradeRecipe(int profession, java.lang.String itemToBuy, java.lang.String itemToSell, float chance) throws java.lang.Exception
profession
- The profession of the villageritemToBuy
- The item that the villager buysitemToSell
- The item that the villager sellschance
- The chance of the recipe (0.0 to 1.0)java.lang.Exception
public void addTradeRecipe(int profession, java.lang.String itemToBuy, java.lang.String secondItemToBuy, java.lang.String itemToSell, float chance) throws java.lang.Exception
profession
- The profession of the villageritemToBuy
- The item that the villager buyssecondItemToBuy
- The second item that the villager buysitemToSell
- The item that the villager sellschance
- The chance of the recipe (0.0 to 1.0)java.lang.Exception
public void removeTradeRecipe(int profession, java.lang.String itemToBuy, java.lang.String itemToSell)
profession
- The profession of the villageritemToBuy
- The item that the villager buysitemToSell
- The item that the villager sellspublic void removeTradeRecipe(int profession, java.lang.String itemToBuy, java.lang.String secondItemToBuy, java.lang.String itemToSell)
profession
- The profession of the villageritemToBuy
- The item that the villager buyssecondItemToBuy
- The second item that the villager buysitemToSell
- The item that the villager sellspublic void addFuel(java.lang.String item, int duration) throws java.lang.Exception
item
- The itemduration
- The durationjava.lang.Exception
public 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.Exception
public 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.Exception
public 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.Exception
public 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.Exception
public 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.Exception
public void removeBiome(java.lang.String biome) throws java.lang.Exception
biome
- The biome to removejava.lang.Exception
public void removeAllBiomesExcept(java.lang.String biome) throws java.lang.Exception
biome
- The biome to removejava.lang.Exception
public 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.Exception
public 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.Exception
public 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.Exception
public void addDungeonMob(java.lang.String name, int rarity) throws java.lang.Exception
name
- The name of the mobrarity
- The rarity of selecting this mob over others. Must be greater then 0.java.lang.Exception
public void removeDungeonMob(java.lang.String name) throws java.lang.Exception
name
- The name of the mobjava.lang.Exception
public void addDungeonLoot(int id, int dv, int rarity) throws java.lang.Exception
id
- The item's iddv
- The item's damage valuerarity
- The relative chance that this item will spawnjava.lang.Exception
public void addDungeonLoot(int id, int dv, int minCount, int maxCount, int 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.java.lang.Exception
public void addChestItem(java.lang.String chest, int id, int dv, int rarity)
chest
- The name of the chest. Possible values are mineshaftCorridor, pyramidDesertyChest, pyramidJungleChest,
pyramidJungleDispenser, strongholdCorridor, strongholdLibrary, strongholdCrossing, villageBlacksmith, bonusChest,
dungeonChestid
- The item's iddv
- The item's damage valuerarity
- The rarity of the item. Higher rarity means higher chance that the item is added to the chest.public void addChestItem(java.lang.String chest, int id, int dv, int minCount, int maxCount, int rarity)
chest
- The name of the chest. Possible values are mineshaftCorridor, pyramidDesertyChest, pyramidJungleChest,
pyramidJungleDispenser, strongholdCorridor, strongholdLibrary, strongholdCrossing, villageBlacksmith, bonusChest,
dungeonChestid
- 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 rarity of the item. Higher rarity means higher chance that the item is added to the chest.public void removeChestItem(java.lang.String chest, int id, int dv)
chest
- The name of the chest. Possible values are mineshaftCorridor, pyramidDesertyChest, pyramidJungleChest,
pyramidJungleDispenser, strongholdCorridor, strongholdLibrary, strongholdCrossing, villageBlacksmith, bonusChest,
dungeonChestid
- The item's iddv
- The item's damage valuepublic void removeDungeonLoot(int id, int dv) throws java.lang.Exception
id
- The item's iddv
- The item's damage valuejava.lang.Exception
public 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.Exception
public void addItem(java.lang.String itemFile, java.lang.String itemType) throws java.lang.Exception
itemFile
- The item's fileitemType
- The item's typejava.lang.Exception
public void addBlock(java.lang.String blockFile, java.lang.String blockType) throws java.lang.Exception
blockFile
- The block's fileblockType
- The block's typejava.lang.Exception
public void addTileEntity(java.lang.String tileEntityFile, java.lang.String tileEntityType) throws java.lang.Exception
tileEntityFile
- The tileentity's filetileEntityType
- The tileentity's typejava.lang.Exception
public 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
public void addWorldGen(java.lang.String worldGenFile, java.lang.String worldGenType) throws java.lang.Exception
worldGenFile
- The world generator's fileworldGenType
- The world generator's typejava.lang.Exception
public void removeMinable(java.lang.String name)
name
- The name of the minable. Possible values are coal, diamond, iron, lapis, redstone, gold, dirt and gravel.public void removeBiomeDecoration(java.lang.String name)
name
- The name of the decorator. Possible values are bigShroom, cactus, clay, deadBush, lilypad, flowers, grass, lake, pumpkin,
reed, sand, sandPass2, shroom, treepublic java.lang.String[] getOreDictClasses()
public java.lang.String[] getOreDictClassItems(java.lang.String clazz)
clazz
- The ore dictionary class.public boolean isItemInOreDictClass(int id, int meta, java.lang.String clazz)
id
- The id of the itemmeta
- The metadata of the itemclazz
- The ore dictionary classpublic void addMobDrop(java.lang.String mob, int id, int meta, int amount)
mob
- The id or name of the mobid
- The id of the itemmeta
- The metadata of the itemamount
- The amount of the itempublic void addMobDrop(java.lang.String mob, int id, int meta, int amount, float rate)
mob
- The id or name of the mobid
- The id of the itemmeta
- The metadata of the itemamount
- The amount of the itemrate
- The rate of the drop where 0.0 is 0% and 1.0 is 100%public void addRareMobDrop(java.lang.String mob, int id, int meta, int amount)
mob
- The id or name of the mobid
- The id of the itemmeta
- The metadata of the itemamount
- The amount of the itempublic void addRareMobDrop(java.lang.String mob, int id, int meta, int amount, float rate)
mob
- The id or name of the mobid
- The id of the itemmeta
- The metadata of the itemamount
- The amount of the itemrate
- The rate of the drop where 0.0 is 0% and 1.0 is 100%public void addCreativeTab(java.lang.String name, int id, int meta)
name
- The name of the tabid
- The id of the tab icon itemmeta
- The metadata of the tab icon itempublic void enableHelmetRendering()
public void disableHelmetRendering()
public void enablePortalRendering()
public void disablePortalRendering()
public void enableHotbarRendering()
public void disableHotbarRendering()
public void enableCrosshairsRendering()
public void disableCrosshairsRendering()
public void enableBossHealthRendering()
public void disableBossHealthRendering()
public void enableHealthRendering()
public void disableHealthRendering()
public void enableArmorRendering()
public void disableArmorRendering()
public void enableFoodRendering()
public void disableFoodRendering()
public void enableAirRendering()
public void disableAirRendering()
public void enableExperienceRendering()
public void disableExperienceRendering()
public void enableObjectiveRendering()
public void disableObjectiveRendering()
public java.lang.String getBlockType(int id)
id
- The id of the block.public java.lang.String getModName()
public java.lang.String readFile(java.lang.String file) throws java.io.IOException
file
- The path of the file to be read. If the path starts with a '/', the path is relative to the .minecraft directory. If it
doesn't start with '/', the path is relative to the mod's data directory.java.io.IOException
public void writeFile(java.lang.String file, java.lang.String content) throws java.io.IOException
file
- The path of the file. If the path starts with a '/', the path is relative to the .minecraft directory. If it doesn't start
with '/', the path is relative to the mod's data directory.content
- The content to write to the file.java.io.IOException
public void appendFile(java.lang.String file, java.lang.String content) throws java.io.IOException
file
- The path of the file. If the path starts with a '/', the path is relative to the .minecraft directory. If it doesn't start
with '/', the path is relative to the mod's data directory.content
- The content to append to the file.java.io.IOException
public void addInductionSmelterRecipe(int energy, java.lang.String primaryInput, java.lang.String secondaryInput, java.lang.String primaryOutput)
energy
- Energy needed to process the item.primaryInput
- The primary input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.secondaryInput
- The secondary input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary (only) output product.public void addInductionSmelterRecipe(int energy, java.lang.String primaryInput, java.lang.String secondaryInput, java.lang.String primaryOutput, java.lang.String secondaryOutput)
energy
- Energy needed to process the item.primaryInput
- The primary input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.secondaryInput
- The secondary input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary output product.secondaryOutput
- The secondary output product. Product % is taken to be 100.public void addInductionSmelterRecipe(int energy, java.lang.String primaryInput, java.lang.String secondaryInput, java.lang.String primaryOutput, java.lang.String secondaryOutput, int secondaryChance)
energy
- Energy needed to process the item.primaryInput
- The primary input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.secondaryInput
- The secondary input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary output product.secondaryOutput
- The secondary output product.secondaryChance
- Integer representing % chance (out of 100) of the secondary product being created.public void addPulverizerRecipe(int energy, java.lang.String input, java.lang.String primaryOutput)
energy
- Energy needed to process the item.input
- The input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary (only) output product.public void addPulverizerRecipe(int energy, java.lang.String input, java.lang.String primaryOutput, java.lang.String secondaryOutput)
energy
- Energy needed to process the item.input
- The input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary output product.secondaryOutput
- The secondary output product. Product % is taken to be 100.public void addPulverizerRecipe(int energy, java.lang.String input, java.lang.String primaryOutput, java.lang.String secondaryOutput, int secondaryChance)
energy
- Energy needed to process the item.input
- The input. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary output product.secondaryOutput
- The secondary output product.secondaryChance
- Integer representing % chance (out of 100) of the secondary product being created.public void addSawmillRecipe(int energy, java.lang.String input, java.lang.String primaryOutput)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary (only) output product.public void addSawmillRecipe(int energy, java.lang.String input, java.lang.String primaryOutput, java.lang.String secondaryOutput)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary output product.secondaryOutput
- The secondary output product. Product % is taken to be 100.public void addSawmillRecipe(int energy, java.lang.String input, java.lang.String primaryOutput, java.lang.String secondaryOutput, int secondaryChance)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.primaryOutput
- The primary output product.secondaryOutput
- The secondary output product.secondaryChance
- Integer representing % chance (out of 100) of the secondary product being created.public void addCrucibleRecipe(int energy, java.lang.String input, java.lang.String output)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.output
- The output liquid. Format: "[LiquidName] [Amount in mB]"public void addLiquidTransposerFillRecipe(int energy, java.lang.String input, java.lang.String output, java.lang.String liquid, boolean reversible)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.output
- The output item.liquid
- The required liquid. Format: "[LiquidName] [Amount in mB]"reversible
- Flag the recipe as reversible (container can be emptied).public void addLiquidTransposerExtractionRecipe(int energy, java.lang.String input, java.lang.String output, java.lang.String liquid, int chance, boolean reversible)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.output
- The output item - this can be NULL if necessary, if the recipe is NOT reversible.liquid
- The required liquid. Format: "[LiquidName] [Amount in mB]"chance
- Integer representing % chance (out of 100) of receiving the item - liquid will always be extracted. If output is NULL,
this MUST be set to 0. The recipe will not be added otherwise.reversible
- Flag the recipe as reversible (container can be filled).public void addPoweredFurnaceRecipe(int energy, java.lang.String input, java.lang.String output)
energy
- Energy needed to process the item.input
- The input item. Notice that if no metadata is given, 0 is then used. It is not possible to allow all metadata.output
- The output item.public void addRefineryRecipe(java.lang.String ingredient1, java.lang.String ingredient2, java.lang.String result, int energy, int delay)
ingredient1
- The first ingredient liquid. Format: "[LiquidName] [Amount in mB]"ingredient2
- The second ingredient liquid. Format: "[LiquidName] [Amount in mB]"result
- The result liquid. Format: "[LiquidName] [Amount in mB]"energy
- The energy needed.delay
- The recipe's delay.public void addAssemblyRecipe(int energy, java.lang.String result, java.lang.String... input)
energy
- The energy needed.result
- The result item.input
- The input items.public void addBlastFurnaceRecipe(java.lang.String input, java.lang.String output, int cookTime)
input
- The input item.output
- The output itemcookTime
- The cook time in tickspublic void addCokeOvenRecipe(java.lang.String input, java.lang.String outputItem, java.lang.String outputLiquid, int cookTime)
input
- The input item.outputItem
- The output itemoutputLiquid
- The output liquid. Format: "[LiquidName] [Amount in mB]"cookTime
- The cook time in ticks.public void addRockCrusherRecipe(java.lang.String input, java.lang.String... output)
input
- The input item.output
- The output items and chances. Each String should be in the format "[Item]|[Chance]" where [Item] is the item and [Chance]
is a float from 0.0 to 1.0 that represents the chance that the output item will be created.