mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Give a way to build the packet131mapdata packet correctly populated
This commit is contained in:
1 parent
b818769c1f
commit
60619643e6
1 file changed
+7
@@ -3,6 +3,7 @@ package cpw.mods.fml.common.network;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.src.EntityPlayerMP;
|
||||
import net.minecraft.src.Packet;
|
||||
import net.minecraft.src.Packet131MapData;
|
||||
import net.minecraft.src.Packet250CustomPayload;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
@@ -71,4 +72,10 @@ public class PacketDispatcher
|
||||
FMLLog.fine("Attempt to send packet to all in dimension without a server instance available");
|
||||
}
|
||||
}
|
||||
|
||||
public static Packet131MapData getTinyPacket(Object mod, short tag, byte[] data)
|
||||
{
|
||||
NetworkModHandler nmh = FMLNetworkHandler.instance().findNetworkModHandler(mod);
|
||||
return new Packet131MapData((short) nmh.getNetworkId(), tag, data);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user