Updated forge to 4.0.0.245 (FML 3.0.175.350) and got same result.
Here's a small example.
package net.minecraft.src;
import java.util.Random;
public class mod_DispenseTest extends BaseMod {
public String getVersion() {
return "1.0";
}
public void load() {}
public int dispenseEntity(World world, ItemStack item, Random rnd, int x, int y, int z, int xVel, int zVel, double entX, double entY, double entZ) {
if (item.getItem().shiftedIndex == Block.stone.blockID) {
EntityChicken chicken = new EntityChicken(world);
chicken.setPosition(entX, entY, entZ);
chicken.setVelocity(xVel, 0, zVel);
world.spawnEntityInWorld(chicken);
return 1;
}
return 0;
}
}
This works with ModLoader. (chicken pops out)
but with Forge, it's not. (just stone will dispensed)
--edit--
Confirmed that the problem has been fixed on Forge 4.0.0.246 / FML 3.0.180.354
Thank you cpw
dispenseEntity method in ModLoader-based mod is never called because FML has different method definition.
ML: int dispenseEntity(World, ItemStack, Random, int, int, int, int, int, double, double, double)
FML: int dispenseEntity(World, ItemStack, Random, double, double, double, int, int, double, double, double)