mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Change gui ticking and world load tick. Should close issue #40 and kill it deader
than a very very dead thing. *$^*(#% Modloader ticking b#%$hit
This commit is contained in:
1 parent
753f5f7bc8
commit
f7e07ca7d8
2 files changed
+35
-35
No files matched your search
@@ -34,7 +34,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
{
|
||||
this.keyboardEvent((KeyBinding)keybinding);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param minecraftInstance
|
||||
* @return
|
||||
@@ -46,7 +46,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
// World and render ticks
|
||||
if (tickEnd && ( tick==TickType.RENDER || tick==TickType.GAME ) && hasWorld) {
|
||||
return onTickInGame((Float) data[0], mc);
|
||||
} else if (tickEnd && (tick==TickType.WORLDGUI || tick==TickType.GUI) && data[1]!=null) {
|
||||
} else if (tickEnd && (tick==TickType.WORLDGUI || tick==TickType.GUI)) {
|
||||
return onTickInGUI((Float) data[0], mc, (GuiScreen)data[1]);
|
||||
}
|
||||
return true;
|
||||
@@ -58,11 +58,11 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
public final void onRenderHarvest(Map renderers)
|
||||
{
|
||||
addRenderer((Map<Class<? extends Entity>,Render>)renderers);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final void onRegisterAnimations()
|
||||
{
|
||||
@@ -99,11 +99,11 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
public final void onServerLogin(Object handler) {
|
||||
serverConnect((NetClientHandler) handler);
|
||||
}
|
||||
|
||||
|
||||
public final void onServerLogout() {
|
||||
serverDisconnect();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final void onPlayerLogin(Object player)
|
||||
{
|
||||
@@ -163,7 +163,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
// BASEMOD API
|
||||
/**
|
||||
* Override if you wish to provide a fuel item for the furnace and return the fuel value of the item
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @param metadata
|
||||
* @return
|
||||
@@ -180,7 +180,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Override if you wish to perform some action other than just dispensing the item from the dispenser
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
@@ -197,7 +197,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Override if you wish to generate Nether (Hell biome) blocks
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param random
|
||||
* @param chunkX
|
||||
@@ -209,7 +209,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Override if you wish to generate Overworld (not hell or the end) blocks
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param random
|
||||
* @param chunkX
|
||||
@@ -221,7 +221,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Return the name of your mod. Defaults to the class name
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getName()
|
||||
@@ -231,7 +231,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Get your mod priorities
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getPriorities()
|
||||
@@ -241,7 +241,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Return the version of your mod
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract String getVersion();
|
||||
@@ -265,7 +265,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Handle item pickup
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @param item
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Ticked every game tick if you have subscribed to tick events through {@link ModLoader#setInGameHook(BaseMod, boolean, boolean)}
|
||||
*
|
||||
*
|
||||
* @param time the rendering subtick time (0.0-1.0)
|
||||
* @param minecraftInstance the client
|
||||
* @return true to continue receiving ticks
|
||||
@@ -293,7 +293,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
/**
|
||||
* Only implemented on the client side
|
||||
* {@link #onChatMessageReceived(EntityPlayer, Packet3Chat)}
|
||||
*
|
||||
*
|
||||
* @param text
|
||||
*/
|
||||
public void receiveChatPacket(String text)
|
||||
@@ -304,7 +304,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
/**
|
||||
* Only called on the client side
|
||||
* {@link #onPacket250Received(EntityPlayer, Packet250CustomPayload)}
|
||||
*
|
||||
*
|
||||
* @param packet
|
||||
*/
|
||||
public void receiveCustomPacket(Packet250CustomPayload packet)
|
||||
@@ -329,15 +329,15 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
}
|
||||
|
||||
public void serverConnect(NetClientHandler handler) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void serverDisconnect() {
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* Called when someone crafts an item from a crafting table
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @param item
|
||||
* @param matrix
|
||||
@@ -377,7 +377,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Called when a chat message is received. Return true to stop further processing
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* @param chat
|
||||
* @return true if you want to consume the message so it is not available for further processing
|
||||
@@ -398,7 +398,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Called when a new client logs in.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
*/
|
||||
public void onClientLogin(EntityPlayer player)
|
||||
@@ -407,7 +407,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
|
||||
/**
|
||||
* Called when a client logs out of the server.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
*/
|
||||
public void onClientLogout(EntityPlayer player)
|
||||
@@ -416,9 +416,9 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Called when a client changes dimensions on the server.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
*/
|
||||
public void onClientDimensionChanged(EntityPlayer player)
|
||||
|
||||
Reference in new issue
Block a user