unlike mobs, other entities don't seem to have any limitation to where they can spawn using a modified monster spawner. so if i have a spawner underground that spawns swords, the swords will appear inside the blocks near the spawner.
this is a problem because this means that these spawners can't be shut down, like regular mob spawners.
this is more of a suggestion, but i think non-mob entities should have a 1x1 block spawning requirement, so that these spawners can be turned off using a piston.
Comments


To shut down a spawner you need to make it so that the conditions for that entity to spawn are not met. In the case of a creeper, thats a solid block with light level 7<. An item drop has no such requirements.

yes, i know item drops have no spawning requirements, because they couldn't spawn before. but now they can, using custom spawners. so i see this as an issue - if the game has an option to spawn in a sort of entities, it shouldn't spawn them inside solid blocks, because that is not correct behavior.

Ahh gotcha

I think that the actual Mod you are using should be making the spawn requirements.

It's not a mod, it's vanilla Minecraft behavior...

He's using a mod to make the other entities spawn.
The mod that alters the Spawners to be configured and spawn those entities should make the requirements themselves. Mojang shouldn't take their jolly own time to patch something for mods, when the mods should do so themselves.

No. I am indeed using a tool to tell the spawners what to do, but the only thing that tool does is opening and editing the game files. This is a feature of the game, you can use maps with these modifications on every client. Also, this isn't tricking the game, this was only added recently for people to use.

These entities you are trying to add (Like swords) were never intended to be implemented into the game, so mojang never needed to add boundaries for these to be spawned.

Tell me. If they weren't intended to be implemented, then why were they implemented?

It was designed spawn any entities, because it's faster than making new blocks to allow to spawn a Zombie, then a Skellie, then a Spider, then a cave spider, etc. This works for Mob Eggs too, you can "spawn swords", but the swords disappear before you see them. It's easier to make one egg, that can spawn any of the current entity list, than to make 20 eggs individually. Same with the Spawners. Better to make one Spawner, that can spawn any of the current entity list, than to make ~6 spawners individually.

those are nice thoughts. the problem is, that spawners didn't always support non-mob entities. this was a new feature somewhere around 1.3.

Mojang added the ability to make extremely customized spawners intentionally for map makers in 1.3+, this is a FEATURE OF THE GAME that is BUGGED. If you don't even know half the features of the vanilla game you shouldn't be telling people what is and isn't a vanilla feature on this issue tracker.

Alright. Stop insulting people indirectly.
I'm pretty sure adding a sword entity to the game is NOT a feature of the game. If it is, where can I find it without mods / third party editors?

http://www.minecraftwiki.net/wiki/Version_history#1.3.1
"Monster Spawners
Added NBT tags to further customize spawned mobs.
Only changeable using map editors or mods.":yellow_star:
http://www.minecraftwiki.net/wiki/Version_history#1.4.2
"Mob Spawners
Added a few NBT tags to change a few key spawning rules
Range can now be changed
Maximum amount of spawned entities within spawning range can now be changed
Horizontal spawning radius can now be changed
Spawned mobs can wear and carry any items and blocks as well as have a custom drop rate of held items
Added an NBT tag for mobs to decide whether they can despawn
Added an NBT tag for mobs to decide whether they are invincible"
:yellow_star: If you're going to be pedantic and say "oh well it requires using external tools or mods to edit the NBT data thus it's irrelevant to vanilla minecraft", then why did they bother to even do this? Mojang aren't the ones using these added NBT tags, map makers are, and that's who they did it for. This is a feature of vanilla Minecraft that Mojang added, and if there are bugs in it they should fix them.
Edit: remove bullet point where it shouldn't be

Wait you can spawn entities in I had no clue u could do this how can u do this please tell me

Custom spawners are, in fact, a feature of the game, and should be properly implemented now that their capabilities have been expanded in vanilla. This update has been almost entirely dedicated to giving map makers much broader tools to work with – it seems like this is quite an issue for anyone who wants to have randomized loot drops in their maps!

Potential fix
.. or at least a start for one..
Add the method getCanSpawnHere() all the way into Entity-class. Thus the EntityLiving merely overrides it. The default implementation would then handle any non-living entity. Effect entities need to be able to spawn about anywhere, so EntityFX would override it, too. Note that currently no other piece of code than the spawner would call those methods.
Entity
/**
* By default, entities can not spawn inside blocks that block movement. This is a bit
* crude check, but then again, it is just the default base implementation.
*/
public boolean getCanSpawnHere() {
int x = (int) Math.floor(this.posX);
int y = (int) Math.floor(this.posY);
int z = (int) Math.floor(this.posZ);
int blockId = this.worldObj.getBlockId(x, y, z);
if (Block.blocksList[blockId].getBlocksMovement(worldObj, x, y, z))
return false;
return true;
}
EntityFX
/**
* By default, all effect entities can spawn anywhere.
*/
public boolean getCanSpawnHere() {
return true;
}
TileEntityMonsterSpawner.updateEntity()
...
//if (var11 == null || var11.getCanSpawnHere()) {
if (tobeSpawnedEntity.getCanSpawnHere()) { // FIX: Simply let the entity decide in all cases
this.writeNBTTagsTo(tobeSpawnedEntity);
this.worldObj.spawnEntityInWorld(tobeSpawnedEntity);
this.worldObj.playAuxSFX(2004, this.xCoord, this.yCoord, this.zCoord, 0);
...
NOT TESTED. I only checked on 1.4.7 that at least pig-spawner still spawned the pigs. (That is, it did not break spawning living entities). Did not check what it would do to spawning non-living entities.

Confirmed in 1.6.2.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.
Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.

Still in 16w05b
For further tests:
/setblock ~ ~ ~ minecraft:mob_spawner 0 replace {SpawnData:{id:ArmorStand,NoGravity:1}}

How can you confirm this bug while MC-97491 is in effect?

Still in 1.9-pre3

Still in 1.9-pre4

Still in 1.9.1-pre1

Still in 1.9.1-pre3

Still in 1.9.3-pre2

Confirmed for 1.10.

Confirmed for 1.10.1.

Unable to reproduce with items as of 20w07a.

Then it's "fixed" and not CR.

Tickets that haven't been reproduced quite some time ago get resolved as CR by us.
Possibly fixed along with MC-15?
If not, related to the spawning-in-sign thing I described over there.