From 19e52bda453565027d2ff4abe04f08ed0d73c1f0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 14 Jul 2015 15:38:06 -0600 Subject: [PATCH] Implement flint & steel behavior Ref #12 --- TrueCraft.Core/Logic/Items/FlintAndSteelItem.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/TrueCraft.Core/Logic/Items/FlintAndSteelItem.cs b/TrueCraft.Core/Logic/Items/FlintAndSteelItem.cs index 3fbd206..1d7b4d5 100644 --- a/TrueCraft.Core/Logic/Items/FlintAndSteelItem.cs +++ b/TrueCraft.Core/Logic/Items/FlintAndSteelItem.cs @@ -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); + } + } } }