mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 09:56:37 -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;
|
JsonObject object;
|
||||||
try {
|
try {
|
||||||
object = arr.get(i).getAsJsonObject();
|
object = arr.get(i).getAsJsonObject();
|
||||||
} catch (JsonParseException e) {
|
} catch (Exception e) {
|
||||||
// reset text
|
// reset text
|
||||||
buffer.append(ChatAttributes.RESET);
|
buffer.append(ChatAttributes.RESET);
|
||||||
buffer.append(arr.get(i).getAsString());
|
buffer.append(arr.get(i).getAsString());
|
||||||
|
@ -63,7 +63,7 @@ public class PacketScoreboardObjective implements ClientboundPacket {
|
|||||||
@Override
|
@Override
|
||||||
public void log() {
|
public void log() {
|
||||||
if (action == ScoreboardObjectiveAction.CREATE || action == ScoreboardObjectiveAction.UPDATE) {
|
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 {
|
} else {
|
||||||
Log.protocol(String.format("Received scoreboard objective action (action=%s, name=\"%s\")", action, name));
|
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 nibbleZ = 0; nibbleZ < 16; nibbleZ++) {
|
||||||
for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
|
for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
|
||||||
|
|
||||||
short singeBlockId = blockTypes[arrayPos];
|
short singeBlockId = (short) (blockTypes[arrayPos] & 0xFF);
|
||||||
byte singleMeta;
|
byte singleMeta;
|
||||||
// get block meta and shift and add (merge) id if needed
|
// get block meta and shift and add (merge) id if needed
|
||||||
if (arrayPos % 2 == 0) {
|
if (arrayPos % 2 == 0) {
|
||||||
@ -72,7 +72,7 @@ public class ChunkUtil {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// low 4 bits
|
// low 4 bits
|
||||||
singleMeta = (byte) (meta[arrayPos / 2] >>> 4);
|
singleMeta = (byte) ((meta[arrayPos / 2] >>> 4) & 0xF);
|
||||||
|
|
||||||
if (BitByte.isBitSet(addBitMask, c)) {
|
if (BitByte.isBitSet(addBitMask, c)) {
|
||||||
singeBlockId = (short) ((singeBlockId << 4) | (addBlockTypes[arrayPos / 2] & 0xF));
|
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