geforkt von Mirrors/Paper
SPIGOT-7631: Fix deserialisation of BlockStateMeta
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
b458583b23
Commit
d195996997
@ -171,6 +171,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|||||||
|
|
||||||
final Material material;
|
final Material material;
|
||||||
private CraftBlockEntityState<?> blockEntityTag;
|
private CraftBlockEntityState<?> blockEntityTag;
|
||||||
|
private NBTTagCompound internalTag;
|
||||||
|
|
||||||
CraftMetaBlockState(CraftMetaItem meta, Material material) {
|
CraftMetaBlockState(CraftMetaItem meta, Material material) {
|
||||||
super(meta);
|
super(meta);
|
||||||
@ -222,7 +223,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|||||||
} else {
|
} else {
|
||||||
material = Material.AIR;
|
material = Material.AIR;
|
||||||
}
|
}
|
||||||
blockEntityTag = getBlockState(material, null);
|
blockEntityTag = getBlockState(material, internalTag);
|
||||||
|
internalTag = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -243,7 +245,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|||||||
super.deserializeInternal(tag, context);
|
super.deserializeInternal(tag, context);
|
||||||
|
|
||||||
if (tag.contains(BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
|
if (tag.contains(BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
|
||||||
blockEntityTag = getBlockState(material, tag.getCompound(BLOCK_ENTITY_TAG.NBT));
|
internalTag = tag.getCompound(BLOCK_ENTITY_TAG.NBT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren