Class BaseMod

java.lang.Object
  extended by BaseMod
Direct Known Subclasses:
mod_Animations, mod_Armor, mod_Arrows, mod_Floodgate, mod_LightSensor, mod_MipMap, mod_RecipeBook, mod_Shelf, 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:
1.0.0

Constructor Summary
BaseMod()
           
 
Method Summary
 int AddFuel(int id, int metadata)
          Used for adding new sources of fuel to the furnace.
 void AddRenderer(java.util.Map<java.lang.Class<? extends ia>,rg> renderers)
          Used to add entity renderers.
 boolean DispenseEntity(ry world, double x, double y, double z, int xVel, int zVel, dk item)
          Dispenses the entity associated with the selected item.
 void GenerateNether(ry world, java.util.Random random, int chunkX, int chunkZ)
          Used for generating new blocks (veins) in Nether.
 void GenerateSurface(ry world, java.util.Random random, int chunkX, int chunkZ)
          Used for generating new blocks (veins) on the surface world.
 java.lang.String getName()
          Descriptive name for this class.
 java.lang.String getPriorities()
          This method will tell ModLoader what must come before or after a mod.
abstract  java.lang.String getVersion()
          Required override that informs users the version of this mod.
 void KeyboardEvent(aby event)
          This method will be called when the register key has been pressed, or held down.
abstract  void load()
          Required override.
 void ModsLoaded()
          Called after all mods are loaded.
 void OnItemPickup(vi player, dk item)
          Is called when an item is picked up from the world.
 boolean OnTickInGame(float tick, net.minecraft.client.Minecraft game)
          Called when enabled, and in game.
 boolean OnTickInGUI(float tick, net.minecraft.client.Minecraft game, xe gui)
          Called when enabled, and a GUI is open.
 void RegisterAnimation(net.minecraft.client.Minecraft game)
          Used for registering animations for items and blocks.
 void RenderInvBlock(acr renderer, yy block, int metadata, int modelID)
          Renders a block in inventory.
 boolean RenderWorldBlock(acr renderer, kq world, int x, int y, int z, yy block, int modelID)
          Renders a block in the world.
 void TakenFromCrafting(vi player, dk item, de matrix)
          Is called when an item is picked up from crafting result slot.
 void TakenFromFurnace(vi player, dk item)
          Is called when an item is picked up from furnace result slot.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseMod

public BaseMod()
Method Detail

AddFuel

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

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

AddRenderer

public void AddRenderer(java.util.Map<java.lang.Class<? extends ia>,rg> 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, rg>)

DispenseEntity

public boolean DispenseEntity(ry world,
                              double x,
                              double y,
                              double z,
                              int xVel,
                              int zVel,
                              dk item)
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.
item - ID of item to chosen to dispense entity.
Returns:
true if item was handled.
See Also:
ModLoader.DispenseEntity(ry, double, double, double, int, int, dk)

GenerateNether

public void GenerateNether(ry 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(ej, int, int, ry)

GenerateSurface

public void GenerateSurface(ry 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(ej, int, int, ry)

getName

public java.lang.String getName()
Descriptive name for this class. Defaults to class name.

Returns:
the name

getPriorities

public java.lang.String getPriorities()
This method will tell ModLoader what must come before or after a mod. Examples:
before:* Require that this mod come before all other mods.
after:* Require that this mod come after all other mods.
before:mod_x Require that this mod come before mod_x
after:mod_x Require that this mod come after mod_x
after:mod_x;after:mod_y Require that this mod come after mod_x and mod_y

Returns:
priority

getVersion

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

Returns:
Version version.

KeyboardEvent

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

Parameters:
event - Reference to the key pressed.
See Also:
ModLoader.RegisterKey(BaseMod, aby, boolean)

load

public abstract void load()
Required override. Put EVERYTHING that has any relation to minecraft in here that needs to be added to the game when loaded. This includes blocks and items.


ModsLoaded

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


OnItemPickup

public void OnItemPickup(vi player,
                         dk item)
Is called when an item is picked up from the world.

Parameters:
player - that picked up item
item - that was picked up

OnTickInGame

public boolean OnTickInGame(float tick,
                            net.minecraft.client.Minecraft game)
Called when enabled, and in game.

Parameters:
tick - Partial tick. Used for smooth animation.
game - Instance of the Minecraft class.
Returns:
true to continue ticking, or false to stop ticking.

OnTickInGUI

public boolean OnTickInGUI(float tick,
                           net.minecraft.client.Minecraft game,
                           xe gui)
Called when enabled, and a GUI is open.

Parameters:
tick - Partial tick. Used for smooth animation.
game - Instance of the Minecraft class.
gui - Current GUI that is open.
Returns:
true to continue ticking, or false to stop ticking.

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(zh), ModLoader.addAnimation(dt)

RenderInvBlock

public void RenderInvBlock(acr renderer,
                           yy block,
                           int metadata,
                           int modelID)
Renders a block in inventory.

Parameters:
renderer - parent renderer. Methods and fields may be referenced from here.
block - reference to block to render.
metadata - of block. Damage on an item.
modelID - ID of block model to render.

RenderWorldBlock

public boolean RenderWorldBlock(acr renderer,
                                kq world,
                                int x,
                                int y,
                                int z,
                                yy block,
                                int modelID)
Renders a block in the world.

Parameters:
renderer - parent renderer. Methods and fields may be referenced from here.
world - to render block in.
x - XPos
y - YPos
z - ZPos
block - reference to block to render.
modelID - ID of block model to render.
Returns:
true if model was rendered.

TakenFromCrafting

public void TakenFromCrafting(vi player,
                              dk item,
                              de matrix)
Is called when an item is picked up from crafting result slot. Normally used to award achievements.

Parameters:
player - that picked up item
item - that was picked up
matrix - crafting matrix that is used

TakenFromFurnace

public void TakenFromFurnace(vi player,
                             dk item)
Is called when an item is picked up from furnace result slot. Normally used to award achievements.

Parameters:
player - that picked up item
item - that was picked up

toString

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