mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 00:47:26 -04:00
Fix some json issues, fix problems in < 1.12.2 block mapping
This commit is contained in:
parent
ec1a7b3465
commit
aa64462ce2
@ -169,7 +169,7 @@ public class TextComponent {
|
||||
JsonObject object;
|
||||
try {
|
||||
object = arr.get(i).getAsJsonObject();
|
||||
} catch (JsonParseException e) {
|
||||
} catch (Exception e) {
|
||||
// reset text
|
||||
buffer.append(ChatAttributes.RESET);
|
||||
buffer.append(arr.get(i).getAsString());
|
||||
|
@ -63,7 +63,7 @@ public class PacketScoreboardObjective implements ClientboundPacket {
|
||||
@Override
|
||||
public void log() {
|
||||
if (action == ScoreboardObjectiveAction.CREATE || action == ScoreboardObjectiveAction.UPDATE) {
|
||||
Log.protocol(String.format("Received scoreboard objective action (action=%s, name=\"%s\", value=\"%s\", type=%s", action, name, value.getColoredMessage(), type.name));
|
||||
Log.protocol(String.format("Received scoreboard objective action (action=%s, name=\"%s\", value=\"%s\", type=%s", action, name, value.getColoredMessage(), type));
|
||||
} else {
|
||||
Log.protocol(String.format("Received scoreboard objective action (action=%s, name=\"%s\")", action, name));
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class ChunkUtil {
|
||||
for (int nibbleZ = 0; nibbleZ < 16; nibbleZ++) {
|
||||
for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
|
||||
|
||||
short singeBlockId = blockTypes[arrayPos];
|
||||
short singeBlockId = (short) (blockTypes[arrayPos] & 0xFF);
|
||||
byte singleMeta;
|
||||
// get block meta and shift and add (merge) id if needed
|
||||
if (arrayPos % 2 == 0) {
|
||||
@ -72,7 +72,7 @@ public class ChunkUtil {
|
||||
}
|
||||
} else {
|
||||
// low 4 bits
|
||||
singleMeta = (byte) (meta[arrayPos / 2] >>> 4);
|
||||
singleMeta = (byte) ((meta[arrayPos / 2] >>> 4) & 0xF);
|
||||
|
||||
if (BitByte.isBitSet(addBitMask, c)) {
|
||||
singeBlockId = (short) ((singeBlockId << 4) | (addBlockTypes[arrayPos / 2] & 0xF));
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user