public override void PlaceBlock(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoords) { Block block = world.GetBlock(blockCoordinates); if (block is Grass) { GrassPath grassPath = new GrassPath { Coordinates = blockCoordinates, }; world.SetBlock(grassPath); } }
public override void PlaceBlock(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoords) { Block block = world.GetBlock(blockCoordinates); if (block is Grass) { GrassPath grassPath = new GrassPath { Coordinates = blockCoordinates, }; world.SetBlock(grassPath); player.Inventory.DamageItemInHand(ItemDamageReason.BlockInteract, null, block); } }