- Fixed multiple saplings with the same ID not working in the Planter

- Fixed crash when using /mt hand on a dedicated server
- Fixed crash in /mt recipes in some cases
This commit is contained in:
Stan Hebben committed 2014-10-16 23:03:53 +02:00
1 parent 59ef38877f
commit 7d886a3ce3
37 files changed
+500 -99

No files matched your search

@@ -0,0 +1,31 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package minetweaker.util;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
/**
*
* @author Stan
*/
public class StringUtil
{
private static final Charset UTF8 = Charset.forName("UTF-8");
private StringUtil() {}
public static String decodeUTF8(byte[] data)
{
return UTF8.decode(ByteBuffer.wrap(data)).toString().trim();
}
public static byte[] encodeUTF8(String data)
{
return UTF8.encode(data).array();
}
}