package net.glowstone.block.entity;

import lombok.Getter;
import lombok.Setter;
import net.glowstone.block.GlowBlock;
import net.glowstone.block.GlowBlockState;
import net.glowstone.block.entity.state.GlowCreatureSpawner;
import net.glowstone.util.nbt.CompoundTag;
import org.bukkit.entity.EntityType;

public class MobSpawnerEntity extends BlockEntity {

    private static final EntityType DEFAULT = EntityType.PIG;

    @Getter
    @Setter
    private EntityType spawning;
    @Getter
    @Setter
    private int delay;

    public MobSpawnerEntity(GlowBlock block) {
        super(block);
        setSaveId("minecraft:mob_spawner");
    }

    @Override
    public void loadNbt(CompoundTag tag) {
        super.loadNbt(tag);

        if (tag.isString("EntityId")) {
            spawning = EntityType.fromName(tag.getString("EntityId"));
            if (spawning == null) {
                spawning = DEFAULT;
            }
        } else {
            spawning = DEFAULT;
        }

        if (tag.isInt("Delay")) {
            delay = tag.getInt("Delay");
        } else {
            delay = 0;
        }
    }

    @Override
    public void saveNbt(CompoundTag tag) {
        super.saveNbt(tag);
        tag.putString("EntityId", spawning == null ? "" : spawning.getName());
        tag.putInt("Delay", delay);
    }
}

@@ -1105,32 +1105,139 @@
        %7D%0A    %7D%0A%0A
+    @Override%0A    public GlowBlockState getState() %7B%0A        return new GlowCreatureSpawner(block);%0A    %7D%0A%0A
     @Override%0A  

Fix a bad edit