This is the grey area. Mojang (now Microsoft) has a strict EULA (End User License Agreement). They have historically taken down "open source" ports that distribute their assets (textures, sounds, names). However, Eaglercraft survives by requiring the user to "cache" assets from an official copy of Minecraft.