MinecraftForge/MinecraftForge — pull request #1043 by requimrar (2014-04-18 08:39:40+00:00)
Title: Fix values without decimal points in WavefrontObject

I spent an afternoon trying to find out why forge would report an 'Incorrect Format' error on my OBJ model. Upon further inspection, this piece of regex is severely bugged.

It looks for values of the form x.y as a Float to parseFloat. parseFloat() can handle values like "13" just as well as it can handle "13.51", so I don't think this was intentional.

The change is very simple, I grouped the decimal point matching into a subexpression, then used the 'zero or one times' modifier.

Apparently Blender always appends a '.0' to values that are integers, but other programs, notably Cinema4D, do not.