Examples of canAttachSpark()


Examples of vazkii.botania.api.mana.spark.ISparkAttachable.canAttachSpark()

  @Override
  public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xv, float yv, float zv) {
    TileEntity tile = world.getTileEntity(x, y, z);
    if(tile instanceof ISparkAttachable) {
      ISparkAttachable attach = (ISparkAttachable) tile;
      if(attach.canAttachSpark(stack) && attach.getAttachedSpark() == null) {
        stack.stackSize--;
        if(!world.isRemote) {
          EntitySpark spark = new EntitySpark(world);
          spark.setPosition(x + 0.5, y + 1.5, z + 0.5);
          world.spawnEntityInWorld(spark);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.