[SPIGOT-2233] World.createEntity(location, EntityType.MINECART_COMMAND) doesn't summon a command minecart. Created: 29/Apr/16  Updated: 02/May/16  Resolved: 02/May/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: mukiu Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Craftbukkit
Environment:

OS: linux
jvm: 1.9


Plugin: none

 Description   

I'm using the bukkit API to summon a command minecart. However it summon a normal ridable minecart instead. When I inspect the craftbukkit code, I found it doesn't even create an command minecart instance!

...
        } else if (Minecart.class.isAssignableFrom(clazz)) {
            if (PoweredMinecart.class.isAssignableFrom(clazz)) {
                entity = new EntityMinecartFurnace(world, x, y, z);
            } else if (StorageMinecart.class.isAssignableFrom(clazz)) {
                entity = new EntityMinecartChest(world, x, y, z);
            } else if (ExplosiveMinecart.class.isAssignableFrom(clazz)) {
                entity = new EntityMinecartTNT(world, x, y, z);
            } else if (HopperMinecart.class.isAssignableFrom(clazz)) {
                entity = new EntityMinecartHopper(world, x, y, z);
            } else if (SpawnerMinecart.class.isAssignableFrom(clazz)) {
                entity = new EntityMinecartMobSpawner(world, x, y, z);
            } else { // Default to rideable minecart for pre-rideable compatibility
                entity = new EntityMinecartRideable(world, x, y, z);
            }
...

I am confused with this 'pre-ridable compatibility', why should there're be such compatibility? (Is the API up to date?)



 Comments   
Comment by md_5 [ 02/May/16 ]

Fixed in 1.9.3.

Generated at Sat Dec 13 15:24:04 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.