Fix server side derp with Forge network packet handler

This commit is contained in:
Christian 2013-05-21 11:01:50 -04:00
parent c8cc7b27d1
commit aa18bed75e
2 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@ -25,7 +25,7 @@ import cpw.mods.fml.common.versioning.VersionRange;
public class InjectedModContainer implements ModContainer
{
private File source;
private ModContainer wrappedContainer;
public final ModContainer wrappedContainer;
public InjectedModContainer(ModContainer mc, File source)
{

View File

@ -5,7 +5,7 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
@ -41,6 +41,7 @@ import com.google.common.hash.Hashing;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.InjectedModContainer;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.discovery.ASMDataTable;
@ -269,6 +270,10 @@ public class FMLNetworkHandler
public NetworkModHandler findNetworkModHandler(Object mc)
{
if (mc instanceof InjectedModContainer)
{
return networkModHandlers.get(((InjectedModContainer)mc).wrappedContainer);
}
if (mc instanceof ModContainer)
{
return networkModHandlers.get(mc);