|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.src.BaseMod
public abstract class BaseMod
Constructor Summary | |
---|---|
BaseMod()
|
Method Summary | |
---|---|
int |
addFuel(int id,
int metadata)
Override if you wish to provide a fuel item for the furnace and return the fuel value of the item |
void |
addRenderer(Map<Class<? extends Entity>,Render> renderers)
|
void |
clientChat(String text)
Only implemented on the client side serverChat(NetServerHandler, String) |
void |
clientConnect(NetClientHandler handler)
Called when a client connects |
void |
clientCustomPayload(NetClientHandler handler,
Packet250CustomPayload packet)
|
void |
clientDisconnect(NetClientHandler handler)
Called when the client disconnects |
boolean |
doTickInGame(TickType tick,
boolean tickEnd,
Object... data)
|
boolean |
doTickInGUI(TickType tick,
boolean tickEnd,
Object... data)
|
void |
generateNether(World world,
Random random,
int chunkX,
int chunkZ)
Override if you wish to generate Nether (Hell biome) blocks |
void |
generateSurface(World world,
Random random,
int chunkX,
int chunkZ)
Override if you wish to generate Overworld (not hell or the end) blocks |
GuiContainer |
getContainerGUI(EntityClientPlayerMP player,
int containerID,
int x,
int y,
int z)
Callback to return a gui screen to display |
String |
getName()
Return the name of your mod. |
String |
getPriorities()
Get your mod priorities |
abstract String |
getVersion()
Return the version of your mod |
void |
keyboardEvent(KeyBinding event)
|
abstract void |
load()
Load your mod |
void |
modsLoaded()
Finish loading your mod |
void |
onClientLogin(EntityPlayer player)
Called when a new client logs in. |
void |
onClientLogout(INetworkManager mgr)
Called when a client logs out of the server. |
void |
onItemPickup(EntityPlayer player,
ItemStack item)
Handle item pickup |
boolean |
onTickInGame(float time,
Minecraft minecraftInstance)
Ticked every game tick if you have subscribed to tick events through ModLoader.setInGameHook(BaseMod, boolean, boolean) |
boolean |
onTickInGame(MinecraftServer minecraftServer)
|
boolean |
onTickInGUI(float tick,
Minecraft game,
GuiScreen gui)
|
void |
receiveCustomPacket(Packet250CustomPayload packet)
Called client side to receive a custom payload for this mod |
void |
registerAnimation(Minecraft game)
|
void |
renderInvBlock(RenderBlocks renderer,
Block block,
int metadata,
int modelID)
|
boolean |
renderWorldBlock(RenderBlocks renderer,
IBlockAccess world,
int x,
int y,
int z,
Block block,
int modelID)
|
void |
serverChat(NetServerHandler source,
String message)
Called when a chat message is received. |
void |
serverConnect(NetHandler handler)
|
void |
serverCustomPayload(NetServerHandler handler,
Packet250CustomPayload packet)
|
void |
serverDisconnect()
|
Entity |
spawnEntity(int entityId,
World world,
double scaledX,
double scaledY,
double scaledZ)
Spawn the entity of the supplied type, if it is your mod's |
void |
takenFromCrafting(EntityPlayer player,
ItemStack item,
IInventory matrix)
Called when someone crafts an item from a crafting table |
void |
takenFromFurnace(EntityPlayer player,
ItemStack item)
Called when someone takes a smelted item from a furnace |
String |
toString()
The identifier string for the mod- used in client<->server negotiation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BaseMod()
Method Detail |
---|
public final boolean doTickInGame(TickType tick, boolean tickEnd, Object... data)
doTickInGame
in interface BaseModProxy
public final boolean doTickInGUI(TickType tick, boolean tickEnd, Object... data)
doTickInGUI
in interface BaseModProxy
public int addFuel(int id, int metadata)
addFuel
in interface BaseModProxy
id
- metadata
- public void addRenderer(Map<Class<? extends Entity>,Render> renderers)
public void generateNether(World world, Random random, int chunkX, int chunkZ)
generateNether
in interface BaseModProxy
world
- random
- chunkX
- chunkZ
- public void generateSurface(World world, Random random, int chunkX, int chunkZ)
generateSurface
in interface BaseModProxy
world
- random
- chunkX
- chunkZ
- public GuiContainer getContainerGUI(EntityClientPlayerMP player, int containerID, int x, int y, int z)
player
- containerID
- x
- y
- z
- public String getName()
getName
in interface BaseModProxy
public String getPriorities()
getPriorities
in interface BaseModProxy
public abstract String getVersion()
getVersion
in interface BaseModProxy
public void keyboardEvent(KeyBinding event)
public abstract void load()
load
in interface BaseModProxy
public void modsLoaded()
modsLoaded
in interface BaseModProxy
public void onItemPickup(EntityPlayer player, ItemStack item)
onItemPickup
in interface BaseModProxy
player
- item
- public boolean onTickInGame(float time, Minecraft minecraftInstance)
ModLoader.setInGameHook(BaseMod, boolean, boolean)
time
- the rendering subtick time (0.0-1.0)minecraftInstance
- the client
public boolean onTickInGame(MinecraftServer minecraftServer)
public boolean onTickInGUI(float tick, Minecraft game, GuiScreen gui)
public void clientChat(String text)
serverChat(NetServerHandler, String)
clientChat
in interface BaseModProxy
text
- public void clientConnect(NetClientHandler handler)
handler
- public void clientDisconnect(NetClientHandler handler)
handler
- public void receiveCustomPacket(Packet250CustomPayload packet)
receiveCustomPacket
in interface BaseModProxy
packet
- public void registerAnimation(Minecraft game)
public void renderInvBlock(RenderBlocks renderer, Block block, int metadata, int modelID)
public boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelID)
public void serverConnect(NetHandler handler)
serverConnect
in interface BaseModProxy
public void serverCustomPayload(NetServerHandler handler, Packet250CustomPayload packet)
serverCustomPayload
in interface BaseModProxy
public void serverDisconnect()
serverDisconnect
in interface BaseModProxy
public void takenFromCrafting(EntityPlayer player, ItemStack item, IInventory matrix)
takenFromCrafting
in interface BaseModProxy
player
- item
- matrix
- public void takenFromFurnace(EntityPlayer player, ItemStack item)
takenFromFurnace
in interface BaseModProxy
player
- item
- public String toString()
toString
in class Object
public void serverChat(NetServerHandler source, String message)
serverChat
in interface BaseModProxy
public void onClientLogin(EntityPlayer player)
onClientLogin
in interface BaseModProxy
player
- public void onClientLogout(INetworkManager mgr)
onClientLogout
in interface BaseModProxy
public Entity spawnEntity(int entityId, World world, double scaledX, double scaledY, double scaledZ)
public void clientCustomPayload(NetClientHandler handler, Packet250CustomPayload packet)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |