Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-16 17:31:21 +02:00
Don't assume CanPlaceOn tag is ListTag
I guess somewhere in my testing I made a CanPlaceOn tag that was a byte value and the client disconnected on me when I put ViaBackwards on my testing instance. This commit doesn't translate the CanPlaceOn tag if it isn't a ListTag.
Dieser Commit ist enthalten in:
Ursprung
03ec04cc8d
Commit
e03da34f55
@ -625,6 +625,8 @@ public class BlockItemPackets1_13 extends nl.matsv.viabackwards.api.rewriters.It
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void rewriteCanPlaceToClient(CompoundTag tag, String tagName) {
|
private void rewriteCanPlaceToClient(CompoundTag tag, String tagName) {
|
||||||
|
// The tag was manually created incorrectly so ignore rewriting it
|
||||||
|
if (!(tag.get(tagName) instanceof ListTag)) return;
|
||||||
ListTag blockTag = tag.get(tagName);
|
ListTag blockTag = tag.get(tagName);
|
||||||
if (blockTag == null) return;
|
if (blockTag == null) return;
|
||||||
|
|
||||||
@ -865,6 +867,7 @@ public class BlockItemPackets1_13 extends nl.matsv.viabackwards.api.rewriters.It
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void rewriteCanPlaceToServer(CompoundTag tag, String tagName) {
|
private void rewriteCanPlaceToServer(CompoundTag tag, String tagName) {
|
||||||
|
if (!(tag.get(tagName) instanceof ListTag)) return;
|
||||||
ListTag blockTag = tag.remove(extraNbtTag + "|" + tagName);
|
ListTag blockTag = tag.remove(extraNbtTag + "|" + tagName);
|
||||||
if (blockTag != null) {
|
if (blockTag != null) {
|
||||||
tag.put(ConverterRegistry.convertToTag(tagName, ConverterRegistry.convertToValue(blockTag)));
|
tag.put(ConverterRegistry.convertToTag(tagName, ConverterRegistry.convertToValue(blockTag)));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren