package net.glowstone.io.entity;

import net.glowstone.entity.passive.GlowWolf;
import net.glowstone.util.nbt.CompoundTag;
import org.bukkit.DyeColor;
import org.bukkit.entity.EntityType;

class WolfStore extends TameableStore<GlowWolf> {

    public WolfStore() {
        super(GlowWolf.class, EntityType.WOLF);
    }

    @Override
    public void load(GlowWolf entity, CompoundTag compound) {
        super.load(entity, compound);
        entity.setCollarColor(DyeColor.getByDyeData(compound.getByte("CollarColor")));
        entity.setAngry(compound.getBool("Angry"));
    }

    @Override
    public void save(GlowWolf entity, CompoundTag tag) {
        super.save(entity, tag);
        tag.putByte("CollarColor", entity.getCollarColor().getDyeData());
        tag.putBool("Angry", entity.isAngry());
    }

}

@@ -427,16 +427,66 @@
 pound);%0A
+        if (compound.isByte(%22CollarColor%22)) %7B%0A    
         
@@ -560,24 +560,78 @@
 rColor%22)));%0A
+        %7D%0A        if (compound.isByte(%22Angry%22)) %7B%0A    
         enti
@@ -666,24 +666,34 @@
 (%22Angry%22));%0A
+        %7D%0A
     %7D%0A%0A    @

Fix exception when spawning Wolf from egg