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 |
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 |
addCreativeTab(java.lang.String name,
int id,
int meta)
Adds a creative tab.
|
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 |
addItem(java.lang.String itemFile,
java.lang.String itemType)
Adds an item with the given type to the game
|
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 |
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 |
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.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic 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 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.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 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.Exceptionpublic 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.Exceptionpublic 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.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,
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.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,
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.Exceptionpublic 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.Exceptionpublic 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.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.Exceptionpublic 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.Exceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic 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