mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-05 16:08:39 +01:00
Fix exception when reading compass with no lodestone linked to it
This commit is contained in:
parent
dd0f2ea293
commit
8561e0cddc
@ -83,7 +83,9 @@ public class CompassMeta implements ItemMeta {
|
|||||||
@Override
|
@Override
|
||||||
public void write(NBTCompound compound) {
|
public void write(NBTCompound compound) {
|
||||||
compound.setByte("LodestoneTracked", (byte) (lodestoneTracked ? 1 : 0));
|
compound.setByte("LodestoneTracked", (byte) (lodestoneTracked ? 1 : 0));
|
||||||
compound.setString("LodestoneDimension", lodestoneDimension);
|
if(lodestoneDimension != null) {
|
||||||
|
compound.setString("LodestoneDimension", lodestoneDimension);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
NBTCompound posCompound = new NBTCompound();
|
NBTCompound posCompound = new NBTCompound();
|
||||||
|
Loading…
Reference in New Issue
Block a user