Does anyone know the Entity Id for mine carts and if you can spawn it with modPE?
var cart = -1;
var playerX;
var playerZ;
var stairBlocks = [53, 67, 108, 109, 114, 128, 134, 135, 136, 156];
function useItem(x, y, z, itemid, blockId, side) {
if (stairBlocks.indexOf(blockId) >= 0) {
//spawn a minecart
cart = Level.spawnMob(x + 0.5, y + 1, z + 0.5, 84, "mob/char.png");
//make it invisible
Entity.setRenderType(cart, 0);
rideAnimal(getPlayerEnt(), cart);
preventDefault();
//store the chair's location: that way, when the player gets off, we can remove the cart
playerX = x + 0.5;
playerZ = z + 0.5;
}
}
function modTick() {
if (cart == -1) return;
if (Math.abs(getPlayerX() - playerX) > 1 || Math.abs(getPlayerZ() - playerZ) > 1) {
Entity.remove(cart);
cart = -1;
}
}
{
if(itemId==280&&blockId==track)
{
Level.spawnMob(x,y+1,z,42);
}
}
you can... i am pretty sure that 500ise did in his flying mobs mod.... we might have the wrong id.
You can spawn them, 500 ise did in this script