mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-19 15:09:15 +00:00
改进SNBTReader, 数字类型后缀b,s,l,f,d忽略大小写.
This commit is contained in:
@@ -161,6 +161,7 @@ public final class SNBTReader extends DefaultStringReader {
|
|||||||
if (tokenLength > 1) {
|
if (tokenLength > 1) {
|
||||||
// 至少有1个字符,给了后缀的可能性
|
// 至少有1个字符,给了后缀的可能性
|
||||||
char lastChar = charAt(tokenStart + tokenLength - 1);
|
char lastChar = charAt(tokenStart + tokenLength - 1);
|
||||||
|
if (lastChar < 'a') lastChar = (char) (lastChar + 32); // 强制转小写进行匹配.
|
||||||
try {
|
try {
|
||||||
switch (lastChar) {
|
switch (lastChar) {
|
||||||
case BYTE_SUFFIX -> {
|
case BYTE_SUFFIX -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user