Initial checkin. Some patches are probably missing, but client compiles.

This commit is contained in:
Christian committed 2012-06-29 20:18:04 -04:00
1 parent aa1a5d3c19
commit bb7ef791de
39 files changed
+210 -506

No files matched your search

@@ -238,11 +238,11 @@ public class FMLClientHandler implements IFMLSidedHandler
*/
public void onPreWorldTick()
{
if (client.field_6324_e != null) {
// For the client world ticks and game ticks are the same
FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLD), client.field_6324_e, client.field_6313_p, client.field_6324_e);
FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.GAME,TickType.WORLDGUI), 0.0f, client.field_6313_p, client.field_6324_e);
}
// if (client.field_6324_e != null) {
// // For the client world ticks and game ticks are the same
// FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLD), client.field_6324_e, client.field_6313_p, client.field_6324_e);
// FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.GAME,TickType.WORLDGUI), 0.0f, client.field_6313_p, client.field_6324_e);
// }
}
/**
@@ -250,11 +250,11 @@ public class FMLClientHandler implements IFMLSidedHandler
*/
public void onPostWorldTick()
{
if (client.field_6324_e != null) {
// For the client world ticks and game ticks are the same
FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.WORLD), client.field_6324_e, client.field_6313_p, client.field_6324_e);
FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.GAME,TickType.WORLDGUI), 0.0f, client.field_6313_p, client.field_6324_e);
}
// if (client.field_6324_e != null) {
// // For the client world ticks and game ticks are the same
// FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.WORLD), client.field_6324_e, client.field_6313_p, client.field_6324_e);
// FMLCommonHandler.instance().tickEnd(EnumSet.of(TickType.GAME,TickType.WORLDGUI), 0.0f, client.field_6313_p, client.field_6324_e);
// }
for (IKeyHandler entry : keyHandlers)
{
entry.onEndTick();
@@ -263,14 +263,14 @@ public class FMLClientHandler implements IFMLSidedHandler
public void onWorldLoadTick()
{
if (client.field_6324_e != null) {
// if (client.field_6324_e != null) {
if (firstTick)
{
loadTextures(fallbackTexturePack);
firstTick = false;
}
FMLCommonHandler.instance().tickStart(EnumSet.of(TickType.WORLDLOAD,TickType.GUILOAD));
}
// }
}
public void onRenderTickStart(float partialTickTime)
@@ -531,14 +531,14 @@ public class FMLClientHandler implements IFMLSidedHandler
continue;
}
if ("REGISTER".equals(packet.field_44012_a))
{
FMLCommonHandler.instance().activateChannel(client.field_6322_g,channel);
}
else
{
FMLCommonHandler.instance().deactivateChannel(client.field_6322_g,channel);
}
// if ("REGISTER".equals(packet.field_44012_a))
// {
// FMLCommonHandler.instance().activateChannel(client.field_6322_g,channel);
// }
// else
// {
// FMLCommonHandler.instance().deactivateChannel(client.field_6322_g,channel);
// }
}
}
catch (UnsupportedEncodingException e)
@@ -921,10 +921,10 @@ public class FMLClientHandler implements IFMLSidedHandler
/**
*
*/
public void preGameLoad(String user, String sessionToken)
public void preGameLoad(String[] args)
{
// Currently this does nothing, but it's possible I could relaunch Minecraft in a new classloader if I wished
Minecraft.fmlReentry(user, sessionToken);
Minecraft.fmlReentry(args);
}
public void onTexturePackChange(RenderEngine engine, TexturePackBase texturepack, List<TextureFX> effects)
+26 -26
View File
@@ -34,7 +34,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
{
this.keyboardEvent((KeyBinding)keybinding);
}
/**
* @param minecraftInstance
* @return
@@ -42,7 +42,7 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseMod
public final boolean doTickInGame(TickType tick, boolean tickEnd, Object minecraftInstance, Object... data)
{
Minecraft mc = (Minecraft) minecraftInstance;
boolean hasWorld = mc.field_6324_e != null;
boolean hasWorld = true;
// World and render ticks
if (tickEnd && ( tick==TickType.RENDER || tick==TickType.GAME ) && hasWorld) {
return onTickInGame((Float) data[0], mc);
@@ -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)