Actually Additions

Actually Additions

66M Downloads

[1.10.2] Spawner reverts back to original after 1 use

jmcaffee opened this issue ยท 28 comments

commented

Looks like the same issue as #95, but this is on 1.10.2 using the All The Mods v1.3 mod pack.

I change (with a spawner changer) a spider spawner to enderman spawner, it spawns one enderman, then reverts back to spider spawner. This is in the overworld.

The spawner was captured/moved using a Mekanism cardboard box.

commented

Hello,
Just referencing this issue from my mod as it seems to be cropping up there too ;)
Cheers,
Me.

commented

Yea, I have no idea what this is all about. Could you try with a normal spawner found in a vanilla dungeon?

commented

I don't freaking get this.
I never had this issue before.

commented

I can't reproduce this and I've never been able to.
Does it just revert back right in front of you? I don't get this.

Please, with the same modpack, try using a spawn egg on the spawner and see if that also gets reverted. Because I use the same code as that.

commented

Yes, using a spawn egg on the spawner resulted in the same thing.

The spawner spawns one creature then reverts to the original spawn setting.

commented

Try removing the mods one at a time to find out what the issue is.

commented

This happens with ALL mods stripped out except MCMultiPart-1.2.0-universal.jar which is required to get my world to load. So, it looks like this is default functionality for 1.10.2 with forge 1.10.2-12.18.1.2014 loaded.

My test procedure:

  • Start with All The Mods 1.10.2 v1.3 mod pack
  • Strip all mods out except for MCMultiPart-1.2.0-universal.jar
  • Set spider spawner to enderman using spawn egg (during the day).
  • Set difficulty to peaceful (w/GUI)
  • Wait till night
  • Exit game
  • Back up world
  • Start game
  • Set difficulty to normal
  • Enderman spawns, spawner changes to spider
commented

/giveing myself a Monster Spawner (which defaults to a pig) and changing it to enderman with a spawn egg does not reproduce the issue. In this case, the spawner stays as enderman after spawning the initial enderman.

The spawner giving me problems (above) was captured from a Rouge Dungeon using a Mekanism cardboard box.

commented

I'll give it a shot as soon as I find one.

commented

im also having this issuse i believe you broke it when fixing the code so no more bosses in the spawner

commented

No, this was a thing since the beginning.
So what did you find out, @jmcaffee?

commented

Still haven't come across a natural dungeon... maybe I'll try finding a stronghold.

@DnTheMn have you tried with a natural spawner?

commented

i havent ive tryed with the spawners from rougelike thats about it

commented

How about you just try it in a creative world?

commented
commented

Not sure I understand. I've already /given myself a spawner (doesn't this kind of match creative methods?) and determined that it does not exhibit the issue.

commented

Well this doesn't make any sense as I tried about 20 times and could never reproduce it.
If it happens when using Spawn Eggs as well, which is a vanilla method, then it has to be a Forge or Multipart bug and I don't really know what to do about that.

commented

Yea, I guess that Roguelike Dungeons just screws their spawners up or something. :v

commented

It'd be awesome if you could report this to Roguelike Dungeons, because you said that it only happens to them, right?

commented

See issues/61 comments by Greymerk.

It sounds like Roguelike Dungeons adds additional NBT data to their spawners that needs to be cleared.

commented

Wait, so are the spawn potentials the weird variable in the spawner logic that's called something with Minecart?
If so, should I just wipe that list when changing the spawner?

commented

Yes, SpawnPotentials = WeightedMinecart. It's the stupidest translation I've ever seen in the mcp code base. What they really are is a list of possible things that may be spawned whenever a spawner pulses. They're selected by random weight. so you could have a spawner that has a 1/10 chance to spawn a creeper or something.

commented

Yea, I just made it wipe the entire list.
And yes, I made it write to nbt, deleted the tag the list is saving on, and then made it read from NBT.
Because without ASM hacking or reflection, I can't actually access the list :v

commented

Interesting solution in that commit. +1

commented

This is all vanilla mechanics. If spawn potentials exist then the spawner will replace the "spawn data" contents with one of the "spawn potentials". if you don't wipe the spawn potentials then replacing the "spawn data" doesn't last longer than a single spawn cycle.

Just for clarity i added a snip from nbtexplorer to show what the nbt structure looks like.

spawner-nbt

commented

But... why doesn't the vanilla spawn egg do that? :v

commented

That's a good question. It's probably an oversight considering the spawn potentials feature was created just for map makers. You don't normally see them used.

commented

After reading the comments some things are making sense. Was trying to make a zombie pig spawner but it kept reverting. The thing that finally worked was to allow the spawner to spawn whatever it had initally then after it does I'm guessing the potential list is cleared and can be set with the egg. Would be interested to see if that works for anyone as a solution.