Implement flint & steel behavior

Ref #12
This commit is contained in:
Drew DeVault 2015-07-14 15:38:06 -06:00
parent a38b20b1c5
commit 19e52bda45

View File

@ -1,7 +1,9 @@
using System;
using TrueCraft.API.Logic;
using TrueCraft.API;
using TrueCraft.API.Networking;
using TrueCraft.API.World;
using TrueCraft.Core.Logic.Blocks;
namespace TrueCraft.Core.Logic.Items
{
@ -39,5 +41,14 @@ namespace TrueCraft.Core.Logic.Items
return false;
}
}
public override void ItemUsedOnBlock(Coordinates3D coordinates, ItemStack item, BlockFace face, IWorld world, IRemoteClient user)
{
coordinates += MathHelper.BlockFaceToCoordinates(face);
if (world.GetBlockID(coordinates) == AirBlock.BlockID)
{
world.SetBlockID(coordinates, FireBlock.BlockID);
}
}
}
}