Support for ModLoader 1.4.2. Good job Risu!
This commit is contained in:
parent
463514fbbe
commit
dd011e16d2
|
@ -169,23 +169,6 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseModPr
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Override if you wish to perform some action other than just dispensing the item from the dispenser
|
|
||||||
*
|
|
||||||
* @param world
|
|
||||||
* @param x
|
|
||||||
* @param y
|
|
||||||
* @param z
|
|
||||||
* @param xVel
|
|
||||||
* @param zVel
|
|
||||||
* @param item
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override if you wish to generate Nether (Hell biome) blocks
|
* Override if you wish to generate Nether (Hell biome) blocks
|
||||||
*
|
*
|
||||||
|
|
|
@ -126,6 +126,17 @@ public class ModLoader
|
||||||
{
|
{
|
||||||
ModLoaderHelper.addCommand(command);
|
ModLoaderHelper.addCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a behaviour to the dispenser
|
||||||
|
*
|
||||||
|
* @param item
|
||||||
|
* @param behavior
|
||||||
|
*/
|
||||||
|
public static void addDispenserBehavior(Item item, IBehaviorDispenseItem behavior)
|
||||||
|
{
|
||||||
|
BlockDispenser.field_82527_a.func_82595_a(item, behavior);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Add localization for the specified string
|
* Add localization for the specified string
|
||||||
*
|
*
|
||||||
|
|
|
@ -73,9 +73,6 @@ public interface BaseModProxy
|
||||||
|
|
||||||
public abstract void onItemPickup(EntityPlayer player, ItemStack item);
|
public abstract void onItemPickup(EntityPlayer player, ItemStack item);
|
||||||
|
|
||||||
public abstract int dispenseEntity(World world, ItemStack item, Random rnd, int x, int y, int z, int xVel, int zVel, double entX,
|
|
||||||
double entY, double entZ);
|
|
||||||
|
|
||||||
public abstract void serverCustomPayload(NetServerHandler handler, Packet250CustomPayload packet);
|
public abstract void serverCustomPayload(NetServerHandler handler, Packet250CustomPayload packet);
|
||||||
|
|
||||||
public abstract void serverChat(NetServerHandler source, String message);
|
public abstract void serverChat(NetServerHandler source, String message);
|
||||||
|
|
|
@ -21,8 +21,7 @@ public class ModLoaderDispenseHelper implements IDispenserHandler
|
||||||
public int dispense(int x, int y, int z, int xVelocity, int zVelocity, World world, ItemStack item, Random random, double entX, double entY,
|
public int dispense(int x, int y, int z, int xVelocity, int zVelocity, World world, ItemStack item, Random random, double entX, double entY,
|
||||||
double entZ)
|
double entZ)
|
||||||
{
|
{
|
||||||
int ret = mod.dispenseEntity(world, item, random, x, y, z, xVelocity, zVelocity, entX, entY, entZ);
|
return -1;
|
||||||
return ret == 0 ? -1 : ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue