Orfeu Posted August 30, 2012 Posted August 30, 2012 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) Quote
cpw Posted September 1, 2012 Posted September 1, 2012 Have you tried updating to the latest forge/FML this should be fixed... Quote
Orfeu Posted September 3, 2012 Author Posted September 3, 2012 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.