if (getMovement() != null)
nbt.setString("movement", DoorRegistry.getId(getMovement()));
if (getSound() != null)
nbt.setString("sound", DoorRegistry.getId(getSound()));
nbt.setInteger("openingTime", getOpeningTime());
<BUG>nbt.setBoolean("redstone", requireRedstone());
nbt.setBoolean("doubleDoor", isDoubleDoor());</BUG>
nbt.setInteger("autoCloseTime", getAutoCloseTime());
if (hasCode())
nbt.setString("code", getCode());

if (getMovement() != null)
nbt.setString("movement", DoorRegistry.getId(getMovement()));
if (getSound() != null)
nbt.setString("sound", DoorRegistry.getId(getSound()));
nbt.setInteger("openingTime", getOpeningTime());
nbt.setInteger("redstoneBehavior", getRedstoneBehavior().ordinal());
nbt.setBoolean("doubleDoor", isDoubleDoor());
nbt.setInteger("autoCloseTime", getAutoCloseTime());
if (hasCode())
nbt.setString("code", getCode());
