Class BaseMod

java.lang.Object
  extended by BaseMod
Direct Known Subclasses:
mod_Arrows, mod_Floodgate, mod_LightSensor, mod_Prefab, mod_RecipeBook, mod_SpawnerGUI, mod_Stackables

public abstract class BaseMod
extends java.lang.Object

Inherit this class in new mods for it to be used by ModLoader.

Version:
Beta 1.2_02

Constructor Summary
BaseMod()
           
 
Method Summary
 int AddFuel(int id)
          Used for adding new sources of fuel to the furnace.
 void AddRecipes(fg recipes)
          Used to add recipes.
 void AddRenderer(java.util.Map<java.lang.Class<? extends nl>,ba> renderers)
          Used to add entity renderers.
 nl DispenseEntity(dn world, double x, double y, double z, float xVel, float zVel, int itemid)
          Dispenses the entity associated with the selected item.
 void GenerateNether(dn world, java.util.Random random, int chunkX, int chunkZ)
          Used for generating new blocks (veins) in Nether.
 void GenerateSurface(dn world, java.util.Random random, int chunkX, int chunkZ)
          Used for generating new blocks (veins) on the surface world.
 void KeyboardEvent(lo event)
          This method will be called when the register key has been pressed, or held down.
 void ModsLoaded()
          Called after all mods are loaded.
 by OpenModGUI(eu player, java.lang.Object instance)
          Opens GUI for use with mods.
 void OSDHook(net.minecraft.client.Minecraft game, boolean ingui)
          Used for displaying OSDs, called each frame.
 void RegisterAnimation(net.minecraft.client.Minecraft game)
          Used for registering animations for items and blocks.
 void RegisterTextureOverrides()
          Deprecated. 
 java.lang.String toString()
           
abstract  java.lang.String Version()
          Required override that informs users the version of this mod.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseMod

public BaseMod()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Version

public abstract java.lang.String Version()
Required override that informs users the version of this mod. Used in console and error reports.

Returns:
Version string.

AddFuel

public int AddFuel(int id)
Used for adding new sources of fuel to the furnace.

Parameters:
id - ItemID for the item to use as fuel.
Returns:
Duration of fuel provided.
See Also:
ModLoader.AddAllFuel(int)

AddRecipes

public void AddRecipes(fg recipes)
Used to add recipes.

Parameters:
recipes - Recipe instance to add to.
See Also:
ModLoader.AddAllRecipes(fg)

DispenseEntity

public nl DispenseEntity(dn world,
                         double x,
                         double y,
                         double z,
                         float xVel,
                         float zVel,
                         int itemid)
Dispenses the entity associated with the selected item.

Parameters:
world - reference to the World.
x - X coordinate.
y - Y coordinate.
z - Z coordinate.
xVel - X velocity.
zVel - Z velocity.
itemid - ID of item to chosen to dispense entity.
Returns:
entity to dispense.
See Also:
ModLoader.DispenseEntity(dn, double, double, double, float, float, int)

AddRenderer

public void AddRenderer(java.util.Map<java.lang.Class<? extends nl>,ba> renderers)
Used to add entity renderers.

Parameters:
renderers - HashMap of the renderers. key is an entity class, value is the renderer.
See Also:
ModLoader.AddAllRenderers(java.util.Map, ba>)

GenerateNether

public void GenerateNether(dn world,
                           java.util.Random random,
                           int chunkX,
                           int chunkZ)
Used for generating new blocks (veins) in Nether.

Parameters:
world - Reference to world.
random - Instance of random to use.
chunkX - X coordinate of chunk.
chunkZ - Z coordinate of chunk.
See Also:
ModLoader.PopulateChunk(bm, int, int, dn)

GenerateSurface

public void GenerateSurface(dn world,
                            java.util.Random random,
                            int chunkX,
                            int chunkZ)
Used for generating new blocks (veins) on the surface world.

Parameters:
world - Reference to world.
random - Instance of random to use.
chunkX - X coordinate of chunk.
chunkZ - Z coordinate of chunk.
See Also:
ModLoader.PopulateChunk(bm, int, int, dn)

OpenModGUI

public by OpenModGUI(eu player,
                     java.lang.Object instance)
Opens GUI for use with mods.

Parameters:
player - Player instance to open GUI for.
instance - Used for identifying which mod this call is for. Allows for passing extra data to GUI.
Returns:
GUI that mod created.
See Also:
ModLoader.OpenModGUI(eu, java.lang.Object)

OSDHook

public void OSDHook(net.minecraft.client.Minecraft game,
                    boolean ingui)
Used for displaying OSDs, called each frame.

Parameters:
game - Instance of the Minecraft class.
ingui - whether a gui is opened.

RegisterTextureOverrides

@Deprecated
public void RegisterTextureOverrides()
Deprecated. 

Used for registering textures to be overlaid over internal tex buffers

See Also:
ModLoader.RegisterAllTextureOverrides(gs), ModLoader.addOverride(java.lang.String, java.lang.String, int)

RegisterAnimation

public void RegisterAnimation(net.minecraft.client.Minecraft game)
Used for registering animations for items and blocks.

Parameters:
game - Instance of the Minecraft class.
See Also:
ModLoader.RegisterAllTextureOverrides(gs), ModLoader.addAnimation(ah)

KeyboardEvent

public void KeyboardEvent(lo event)
This method will be called when the register key has been pressed, or held down.

Parameters:
event - Reference to the key pressed.

ModsLoaded

public void ModsLoaded()
Called after all mods are loaded.