mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fix server side derp with Forge network packet handler
This commit is contained in:
1 parent
4922e90d81
commit
3bf50c4bbe
2 files changed
+8
-3
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user