1.7.10 moving forward to v1.1.0!

This commit is contained in:
WayofTime 2014-07-15 19:23:57 -04:00
parent 1778cfa737
commit a92efa364d
51 changed files with 849 additions and 175 deletions

View file

@ -0,0 +1,34 @@
package WayofTime.alchemicalWizardry.api.harvest;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.world.World;
public class HarvestRegistry
{
public static List<IHarvestHandler> handlerList = new ArrayList();
public static void registerHarvestHandler(IHarvestHandler handler)
{
System.out.println("Heeeeelllooooo");
handlerList.add(handler);
}
public static boolean harvestBlock(World world, int xCoord, int yCoord, int zCoord)
{
Block block = world.getBlock(xCoord, yCoord, zCoord);
int meta = world.getBlockMetadata(xCoord, yCoord, zCoord);
for(IHarvestHandler handler : handlerList)
{
if(handler.harvestAndPlant(world, xCoord, yCoord, zCoord, block, meta))
{
return true;
}
}
return false;
}
}