mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-02 20:56:40 +00:00
add patch for negative infinity and infinity attributes causing disconnect
This commit is contained in:
21
src/main/java/ca/momothereal/mojangson/MojangsonFinder.java
Normal file
21
src/main/java/ca/momothereal/mojangson/MojangsonFinder.java
Normal file
@ -0,0 +1,21 @@
|
||||
package ca.momothereal.mojangson;
|
||||
|
||||
import ca.momothereal.mojangson.ex.MojangsonParseException;
|
||||
import ca.momothereal.mojangson.value.*;
|
||||
|
||||
import static ca.momothereal.mojangson.MojangsonToken.*;
|
||||
|
||||
public class MojangsonFinder {
|
||||
|
||||
/**
|
||||
* Automatically detects the appropriate MojangsonValue from the given value.
|
||||
* @param value The value to parse
|
||||
* @return The resulting MojangsonValue. If the type couldn't be found, it falls back to MojangsonString
|
||||
* @throws MojangsonParseException if the given value could not be parsed
|
||||
*/
|
||||
public static MojangsonValue readFromValue(String value) throws MojangsonParseException {
|
||||
MojangsonValue val = new MojangsonString();
|
||||
val.read(value);
|
||||
return val;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user